@Test public void testCreate() { AssetCategoryResponse assetCategoryResponse = null; try { assetCategoryResponse = getAssetCategoryResponse("assetcategorycreateresponse.json"); } catch (final Exception e) { e.printStackTrace(); fail(); } final AssetCategoryRequest assetCategoryRequest = new AssetCategoryRequest(); assetCategoryRequest.setRequestInfo(null); assetCategoryRequest.setAssetCategory(getAssetCategory()); when(assetCategoryRepository.create(any(AssetCategoryRequest.class))).thenReturn(getAssetCategory()); assetCategoryService.create(Matchers.any(AssetCategoryRequest.class)); assertEquals(assetCategoryResponse.getAssetCategory().get(0).toString(), assetCategoryRequest.getAssetCategory().toString()); }
public void create(final AssetCategoryRequest assetCategoryRequest) { try { assetCategoryRepository.create(assetCategoryRequest); } catch (final Exception ex) { log.info("AssetCategoryService create"); throw new RuntimeException("exceptions occured while persisting the asset category"); } }
AssetCategoryService { public void create(final AssetCategoryRequest assetCategoryRequest) { try { assetCategoryRepository.create(assetCategoryRequest); } catch (final Exception ex) { log.info("AssetCategoryService create"); throw new RuntimeException("exceptions occured while persisting the asset category"); } } }
AssetCategoryService { public void create(final AssetCategoryRequest assetCategoryRequest) { try { assetCategoryRepository.create(assetCategoryRequest); } catch (final Exception ex) { log.info("AssetCategoryService create"); throw new RuntimeException("exceptions occured while persisting the asset category"); } }  }
AssetCategoryService { public void create(final AssetCategoryRequest assetCategoryRequest) { try { assetCategoryRepository.create(assetCategoryRequest); } catch (final Exception ex) { log.info("AssetCategoryService create"); throw new RuntimeException("exceptions occured while persisting the asset category"); } }  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 void create(final AssetCategoryRequest assetCategoryRequest) { try { assetCategoryRepository.create(assetCategoryRequest); } catch (final Exception ex) { log.info("AssetCategoryService create"); throw new RuntimeException("exceptions occured while persisting the asset category"); } }  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);  }