@Test public void createAssetCategory() { final AssetCategory assetCategory = getAssetCategory(); final AssetCategoryRequest assetCategoryRequest = new AssetCategoryRequest(); assetCategoryRequest.setAssetCategory(assetCategory); final List<AssetCategory> assetCategories = new ArrayList<>(); assetCategories.add(assetCategory); final AssetCategoryResponse assetCategoryResponse = new AssetCategoryResponse(); assetCategoryResponse.setResponseInfo( responseInfoFactory.createResponseInfoFromRequestHeaders(assetCategoryRequest.getRequestInfo())); assetCategoryResponse.setAssetCategory(assetCategories); assertTrue(assetCategory.equals(assetCategoryService.createAssetCategory(assetCategoryRequest))); }
public AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest) { final AssetCategory assetCategory = assetCategoryRequest.getAssetCategory(); assetCategory.setDepreciationRate(assetCommonService.getDepreciationRate(assetCategory.getDepreciationRate())); assetCategory.setCode(assetCommonService.getCode("%03d", Sequence.ASSETCATEGORYCODESEQUENCE)); assetCategory.setId(assetCommonService.getNextId(Sequence.ASSETCATEGORYSEQUENCE)); create(assetCategoryRequest); return assetCategoryRequest.getAssetCategory(); }
AssetCategoryService { public AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest) { final AssetCategory assetCategory = assetCategoryRequest.getAssetCategory(); assetCategory.setDepreciationRate(assetCommonService.getDepreciationRate(assetCategory.getDepreciationRate())); assetCategory.setCode(assetCommonService.getCode("%03d", Sequence.ASSETCATEGORYCODESEQUENCE)); assetCategory.setId(assetCommonService.getNextId(Sequence.ASSETCATEGORYSEQUENCE)); create(assetCategoryRequest); return assetCategoryRequest.getAssetCategory(); } }
AssetCategoryService { public AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest) { final AssetCategory assetCategory = assetCategoryRequest.getAssetCategory(); assetCategory.setDepreciationRate(assetCommonService.getDepreciationRate(assetCategory.getDepreciationRate())); assetCategory.setCode(assetCommonService.getCode("%03d", Sequence.ASSETCATEGORYCODESEQUENCE)); assetCategory.setId(assetCommonService.getNextId(Sequence.ASSETCATEGORYSEQUENCE)); create(assetCategoryRequest); return assetCategoryRequest.getAssetCategory(); }  }
AssetCategoryService { public AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest) { final AssetCategory assetCategory = assetCategoryRequest.getAssetCategory(); assetCategory.setDepreciationRate(assetCommonService.getDepreciationRate(assetCategory.getDepreciationRate())); assetCategory.setCode(assetCommonService.getCode("%03d", Sequence.ASSETCATEGORYCODESEQUENCE)); assetCategory.setId(assetCommonService.getNextId(Sequence.ASSETCATEGORYSEQUENCE)); create(assetCategoryRequest); return assetCategoryRequest.getAssetCategory(); }  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 AssetCategory createAssetCategory(final AssetCategoryRequest assetCategoryRequest) { final AssetCategory assetCategory = assetCategoryRequest.getAssetCategory(); assetCategory.setDepreciationRate(assetCommonService.getDepreciationRate(assetCategory.getDepreciationRate())); assetCategory.setCode(assetCommonService.getCode("%03d", Sequence.ASSETCATEGORYCODESEQUENCE)); assetCategory.setId(assetCommonService.getNextId(Sequence.ASSETCATEGORYSEQUENCE)); create(assetCategoryRequest); return assetCategoryRequest.getAssetCategory(); }  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);  }