database.close();
database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
ODocument loadedDoc = database.load(rid);
Assert.assertTrue(loadedDoc.containsField("embeddedList"));
Assert.assertTrue(loadedDoc.field("embeddedList") instanceof List<?>);
Assert.assertTrue(((List<ODocument>) loadedDoc.field("embeddedList")).get(0) instanceof ODocument);
ODocument d = ((List<ODocument>) loadedDoc.field("embeddedList")).get(0);
Assert.assertEquals(d.field("name"), "Luca");