Hello,
I am doing a very basic unit test with Objectify.
I have the GAE helper libraries setup, to emulate DataStore.
when I persist an entity with objectify, it works,
but when I check the Version, the Version is "null".
do you know why this might be the case ?
@Test
public void testAddingNewPerson(){
Person tobeAdded = new Person("John","Doe");
log.info("Person to be Added is: {}", tobeAdded);
assertNotNull(ofy.put(tobeAdded));//passes
assertNotNull(tobeAdded.getId());//passes
assertEquals(tobeAdded.getName(), "John");//passes
assertEquals(tobeAdded.getFolder(), "Doe");//passes
Person fetched = ofy.get(Person.class, tobeAdded.getId());
log.info("Fetched Person is: {}", fetched); //to verify,
everything is set, but the Version is NULL
assertNotNull(tobeAdded.getVersion()); // FAILS !
}