/** */
@Test
public void savingEntityWithNameIdWorks() throws Exception {
fact().register(NamedTrivial.class);
NamedTrivial triv = new NamedTrivial("first", "foo", 5);
Key<NamedTrivial> k = ofy().save().entity(triv).now();
assert k.getName().equals("first");
Key<NamedTrivial> createdKey = Key.create(NamedTrivial.class, "first");
assert k.equals(createdKey);
NamedTrivial fetched = ofy().load().key(k).now();
assert fetched.getName().equals(k.getName());
assert fetched.getSomeNumber() == triv.getSomeNumber();
assert fetched.getSomeString().equals(triv.getSomeString());
}