assertEquals(qf.field.getName(), qfRes.field.getName());
}
public void testDumpRestoreQueryFilterSearch() {
Query<PersonLongAutoID> query = pm.createQuery(PersonLongAutoID.class).search("test", "firstName", "lastName");
QueryFilterSearch qf = (QueryFilterSearch)query.getFilters().get(0);
String str = JsonSerializer.serialize(qf).toString();
assertNotNull(str);
QueryFilterSearch qfRes = (QueryFilterSearch)JsonSerializer.deserialize(QueryFilter.class, Json.loads(str));
assertNotNull(qfRes);
assertEquals(qf.match, qfRes.match);
for(int i=0; i<qfRes.fields.length; i++){
assertEquals(qf.fields[i], qfRes.fields[i]);
}