ObjectSet<Pilot> result = db.queryByExample(proto);
assertEquals(1, result.size());
}
public void testUpdatePilot() {
ObjectSet<Pilot> result = db.queryByExample(new Pilot("Michael Schumacher", 0));
Pilot found = (Pilot) result.next();
found.addPoints(11);
int newPoints = found.getPoints();
db.store(found);
System.out.println("Added 11 points for " + found);
testRetrieveAllPilots();
result = db.queryByExample(new Pilot("Michael Schumacher", newPoints));
found = (Pilot) result.next();
assertNotNull(found);
assertEquals(newPoints, found.getPoints());
}