@Test public void save() { Map<String, List<String>> properties = new HashMap<String, List<String>>(); properties.put("type", Arrays.asList("video", "show")); DBObject object = new DBObject(); object.setObjectId("testId"); object.setDate(new Date()); object.setObjectProperties(properties); datastore.save(object); assertThat(datastore.find(DBObject.class).countAll()).isEqualTo(1); DBObject dbObject = datastore.find(DBObject.class).field("objectId").equal("testId").get(); assertThat(dbObject.getObjectProperties() == properties); }
@Test public void containsValue() { DBObject object = DBObject.fromObject(TestData.testObject()); assertThat(object.containsValue("musique")).isTrue(); }