@After public void afterTest() throws Exception { List<String> names = inventoryRepository.findAllNames(); Assert.assertEquals(2, names.size()); assertThat(names, contains("existing_category", "default_category")); }
@Test public void test() throws Exception { List<InventoryCategory> categories = inventoryRepository.findAll(); Assert.assertEquals(1, categories.size()); Assert.assertEquals("existing_category", categories.get(0).getCategoryName()); }