@Test public void testDeleteAllEntities() { TestEntity t1 = new TestEntity(); t1.setStringProperty(String.format("1")); TestEntity t2 = new TestEntity(); t2.setStringProperty(String.format("2")); repository.save(Arrays.asList(t1, t2)); repository.deleteAll(); assertNull("Checking that the result is null.", repository.findById(t1.getId())); assertNull("Checking that the result is null.", repository.findById(t2.getId())); }