@Test public void testSearch() { final List<AssetCategory> assetCategories = new ArrayList<>(); assetCategories.add(getAssetCategory()); when(assetCategoryRepository.search(any(AssetCategoryCriteria.class))).thenReturn(assetCategories); assertTrue(assetCategories.equals(assetCategoryService.search(any(AssetCategoryCriteria.class)))); }
public List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria) { return assetCategoryRepository.search(assetCategoryCriteria); }
AssetCategoryService { public List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria) { return assetCategoryRepository.search(assetCategoryCriteria); } }
AssetCategoryService { public List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria) { return assetCategoryRepository.search(assetCategoryCriteria); }  }
AssetCategoryService { public List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria) { return assetCategoryRepository.search(assetCategoryCriteria); }  List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria); void create(final AssetCategoryRequest assetCategoryRequest); AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest); AssetCategory update(final AssetCategoryRequest assetCategoryRequest); AssetCategory updateAssetCategory(final AssetCategoryRequest assetCategoryRequest); }
AssetCategoryService { public List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria) { return assetCategoryRepository.search(assetCategoryCriteria); }  List<AssetCategory> search(final AssetCategoryCriteria assetCategoryCriteria); void create(final AssetCategoryRequest assetCategoryRequest); AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest); AssetCategory update(final AssetCategoryRequest assetCategoryRequest); AssetCategory updateAssetCategory(final AssetCategoryRequest assetCategoryRequest);  }