use of dev.morphia.test.models.errors.ContainsMapLike in project morphia by mongodb.
the class TestMapping method testMapLike.
@Test
public void testMapLike() {
final ContainsMapLike ml = new ContainsMapLike();
ml.m.put("first", "test");
getDs().save(ml);
final ContainsMapLike mlLoaded = getDs().find(ContainsMapLike.class).iterator(new FindOptions().limit(1)).next();
assertNotNull(mlLoaded);
assertNotNull(mlLoaded.m);
assertTrue(mlLoaded.m.containsKey("first"));
}
Aggregations