@Test public void getCategory_shouldFindExistingCategory() { Category existingCategory = createCategoryBuilderWithAllFields().build(); insertCategory(existingCategory); Category category = categoryDao.getCategory(existingCategory.getCategoryId()); assertReflectionEquals(existingCategory, category); }
public Category getCategory(final String categoryId) { checkNotNull(emptyToNull(categoryId), "Argument[categoryId] must not be empty or null"); Category category = super.read(categoryId); logger.info("Found for id[{}] following category[{}]", categoryId, category); return category; }
CategoryDao extends AbstractBaseDao<Category, String> implements CategoryMapper { public Category getCategory(final String categoryId) { checkNotNull(emptyToNull(categoryId), "Argument[categoryId] must not be empty or null"); Category category = super.read(categoryId); logger.info("Found for id[{}] following category[{}]", categoryId, category); return category; } }
CategoryDao extends AbstractBaseDao<Category, String> implements CategoryMapper { public Category getCategory(final String categoryId) { checkNotNull(emptyToNull(categoryId), "Argument[categoryId] must not be empty or null"); Category category = super.read(categoryId); logger.info("Found for id[{}] following category[{}]", categoryId, category); return category; } CategoryDao(final String collectionName); }
CategoryDao extends AbstractBaseDao<Category, String> implements CategoryMapper { public Category getCategory(final String categoryId) { checkNotNull(emptyToNull(categoryId), "Argument[categoryId] must not be empty or null"); Category category = super.read(categoryId); logger.info("Found for id[{}] following category[{}]", categoryId, category); return category; } CategoryDao(final String collectionName); List<Category> getCategoryList(); Category getCategory(final String categoryId); }
CategoryDao extends AbstractBaseDao<Category, String> implements CategoryMapper { public Category getCategory(final String categoryId) { checkNotNull(emptyToNull(categoryId), "Argument[categoryId] must not be empty or null"); Category category = super.read(categoryId); logger.info("Found for id[{}] following category[{}]", categoryId, category); return category; } CategoryDao(final String collectionName); List<Category> getCategoryList(); Category getCategory(final String categoryId);  }