Storage storage = new DatabaseStorage(connection);
List<Cat> cats = storage.list(Cat.class);
for (Cat cat : cats) {
storage.delete(cat);
}
cats = storage.list(Cat.class);
if (!cats.isEmpty()) throw new Exception("Cats should not be in database!");
for(int i = 1; i <= 20; i++) {
Cat cat = new Cat();
cat.setName("cat" + i);