@Test
public void get() {
System.out.println("get(): initializing...");
ParseRegistry.registerSubclass(Person.class);
Person parseObject = new Person();
parseObject.setAge(31);
parseObject.setGender("female");
try {
parseObject.save();
ParseQuery<Person> query = ParseQuery.getQuery(Person.class);
Person person = query.get(parseObject.getObjectId());
System.out.println("get(): objectId - " + person.getObjectId() + "-" + parseObject.getObjectId());
System.out.println("get(): gender - " + person.getGender() + "-" + parseObject.getGender());
System.out.println("get(): ages - " + person.getAge() + "-" + parseObject.getAge());
assertFalse("get(): ObjectIds should be the same", !parseObject.getObjectId().equals(person.getObjectId()));
assertFalse("get(): Ages should be the same", parseObject.getAge() != person.getAge());
assertFalse("get(): Genders should be the same", !parseObject.getGender().equals(person.getGender()));
}
catch(ParseException pe) {
assertNull("save(): should not have thrown ParseException", pe);
}
}