assertEquals(opt, optRestored);
}
public void testDumpRestoreQueryFilterSimple() {
Query<PersonLongAutoID> query = pm.createQuery(PersonLongAutoID.class).filter("firstName", "abcde");
QueryFilterSimple qf = (QueryFilterSimple)query.getFilters().get(0);
String str = JsonSerializer.serialize(qf).toString();
assertNotNull(str);
QueryFilterSimple qfRes = (QueryFilterSimple)JsonSerializer.deserialize(QueryFilter.class, Json.loads(str));
assertNotNull(qfRes);
assertEquals(qf.operator, qfRes.operator);
assertEquals(qf.value, qfRes.value);
assertEquals(qf.field.getName(), qfRes.field.getName());
}