// Delete the data
db.updatePersonData(CANON_USER, SELF_GROUP, APP_ID,
null, ImmutableMap.of("count", "10", "newvalue", "20"), new FakeGadgetToken());
// Fetch the remaining and test
DataCollection responseItem = db.getPersonData(
Sets.newHashSet(CANON_USER), SELF_GROUP, APP_ID, Collections.<String>emptySet(),
new FakeGadgetToken()).get();
assertFalse(responseItem.getEntry().isEmpty());
assertFalse(responseItem.getEntry().get(CANONICAL_USER_ID).isEmpty());
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).size() == 3);
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).containsKey("count"));
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).get("count").equals("10"));
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).containsKey("newvalue"));
assertTrue(responseItem.getEntry().get(CANONICAL_USER_ID).get("newvalue").equals("20"));
}