    @Test
    public void dataServiceCanFetchCategories() {

        Category category = new Category();
        category.setName("foo");

        long count = categoryRepository.count();
        Category created = categoryRepository.save(category);
        Assert.assertNotEquals(-1, created.getId());

        Assert.assertEquals(count + 1, categoryRepository.count());

        Collection<Category> allProducts = service.getAllCategories();
        Optional<Category> found = allProducts.stream()
                .filter(cat -> cat.getId() == created.getId()).findFirst();
        Assert.assertTrue(found.isPresent());
        Assert.assertEquals(created.getName(), found.get().getName());
    }