context.dbAdmin().dropDatabase();
}
public void objectWithIdCanBeStored() {
final DBCollection<TestObjectWithId> collection = context.openCollection("foo", TestObjectWithId.class);
final TestObjectWithId item = collection.save(new TestObjectWithId("foo", 123));
TestObjectWithId itemFromDb = collection.find(item.id());
specify(collection.query(new Query().field("name").is("foo")).get(0).value(), does.equal(123));
specify(itemFromDb.id(), does.equal(item.id()));
collection.delete(item.id());
specify(new Block() {
@Override
public void run() throws Throwable {
collection.find(item.id());