@Test public void test_search() { final AssetStatusCriteria assetStatusCriteria = getAssetStatusCriteria(); final AssetStatusResponse expectedAssetStatusResponse = getAssetStatusResponse(); when(assetMasterRepository.search(any(AssetStatusCriteria.class))).thenReturn(getAssetStatuses()); final AssetStatusResponse actualAssetStatusResponse = assetMasterService.search(assetStatusCriteria, new RequestInfo()); assertEquals(expectedAssetStatusResponse.toString(), actualAssetStatusResponse.toString()); }
public AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo) { final AssetStatusResponse assetStatusResponse = new AssetStatusResponse(); assetStatusResponse.setResponseInfo(new ResponseInfo()); final List<AssetStatus> assetStatuses = assetMasterRepository.search(assetStatusCriteria); assetStatusResponse.setAssetStatus(assetStatuses); return assetStatusResponse; }
AssetMasterService { public AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo) { final AssetStatusResponse assetStatusResponse = new AssetStatusResponse(); assetStatusResponse.setResponseInfo(new ResponseInfo()); final List<AssetStatus> assetStatuses = assetMasterRepository.search(assetStatusCriteria); assetStatusResponse.setAssetStatus(assetStatuses); return assetStatusResponse; } }
AssetMasterService { public AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo) { final AssetStatusResponse assetStatusResponse = new AssetStatusResponse(); assetStatusResponse.setResponseInfo(new ResponseInfo()); final List<AssetStatus> assetStatuses = assetMasterRepository.search(assetStatusCriteria); assetStatusResponse.setAssetStatus(assetStatuses); return assetStatusResponse; }  }
AssetMasterService { public AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo) { final AssetStatusResponse assetStatusResponse = new AssetStatusResponse(); assetStatusResponse.setResponseInfo(new ResponseInfo()); final List<AssetStatus> assetStatuses = assetMasterRepository.search(assetStatusCriteria); assetStatusResponse.setAssetStatus(assetStatuses); return assetStatusResponse; }  AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo); List<AssetStatus> getStatuses(final AssetStatusObjectName objectName, final Status code,
            final String tenantId); }
AssetMasterService { public AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo) { final AssetStatusResponse assetStatusResponse = new AssetStatusResponse(); assetStatusResponse.setResponseInfo(new ResponseInfo()); final List<AssetStatus> assetStatuses = assetMasterRepository.search(assetStatusCriteria); assetStatusResponse.setAssetStatus(assetStatuses); return assetStatusResponse; }  AssetStatusResponse search(final AssetStatusCriteria assetStatusCriteria, final RequestInfo requestInfo); List<AssetStatus> getStatuses(final AssetStatusObjectName objectName, final Status code,
            final String tenantId);  }