database.close();
database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");
ODocument loadedDoc = database.load(rid);
Assert.assertTrue(loadedDoc.containsField("embeddedMap"));
Assert.assertTrue(loadedDoc.field("embeddedMap") instanceof Map<?, ?>);
Assert.assertTrue(((Map<String, ODocument>) loadedDoc.field("embeddedMap")).values().iterator().next() instanceof ODocument);
ODocument d = ((Map<String, ODocument>) loadedDoc.field("embeddedMap")).get("Luca");
Assert.assertEquals(d.field("name"), "Luca");