ODocument docMerge1 = doc1.copy();
docMerge1.merge(doc2, true, true);
Assert.assertTrue(docMerge1.containsField("embeddedList"));
Assert.assertTrue(docMerge1.field("embeddedList") instanceof List<?>);
Assert.assertEquals(((List<String>) docMerge1.field("embeddedList")).size(), 4);
Assert.assertTrue(((List<String>) docMerge1.field("embeddedList")).get(0) instanceof String);
Assert.assertEquals(((Integer) docMerge1.field("salary")).intValue(), 10000);
Assert.assertEquals(((Integer) docMerge1.field("years")).intValue(), 32);
ODocument docMerge2 = doc1.copy();