assertNotNull(str);
assertEquals("{\"value\": {\"pageType\": \"TEMPORARY\", \"state\": \"PASSIVE\", \"pageSize\": 0, \"type\": 1}, \"type\": \""+QueryOptionPage.class.getName()+"\"}", str);
}
public void testRestoreQueryOption() {
QueryOption optRestored = (QueryOption)JsonSerializer.deserialize(QueryOption.class, Json.loads(
"{\"type\":\""+QueryOptionPage.class.getName()+"\", \"value\": {\"pageType\": \"TEMPORARY\", \"state\": \"PASSIVE\", \"pageSize\": 0, \"type\": 1} }"
));
Query<PersonLongAutoID> query = pm.createQuery(PersonLongAutoID.class);
QueryOption opt = query.option(QueryOptionPage.ID);
assertEquals(opt, optRestored);
}