Test was taken from HARMONY-1863 Test2.java