@Test
public void testNullHandling() throws Exception {
fact().register(Town.class);
// null mayor
Town t1 = new Town();
t1.mayor = new Someone(null, 30);
Key<Town> t1Key = ofy().save().entity(t1).now();
Town t2 = ofy().load().key(t1Key).now();
assert t2.mayor != null;
assert t2.mayor.name == null;
// mayor with null names
t1 = new Town();
t1.mayor = new Someone(new Name(null, null), 30);
t1Key = ofy().save().entity(t1).now();
t2 = ofy().load().key(t1Key).now();