@Test public void getListOfApplicationsTest()throws DataException{ AssetApi assetApi = new AssetApi(); AssetApiData apidata = new AssetApiData(); AssetCountDTO application = new AssetCountDTO(); AssetCountDTO[] applications = new AssetCountDTO[]{application}; application.setName("app1"); application.setName("app2"); apidata.setApplications(applications); assetApi.setData(apidata); when( assetServiceClient.getApplicationsList(anyString(),anyString())).thenReturn(assetApi); filterRepositoryImpl.getListOfApplications("aws-all", "1"); }
public AssetCountDTO[] getListOfApplications(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getApplicationsList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getApplications(); }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfApplications(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getApplicationsList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getApplications(); } }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfApplications(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getApplicationsList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getApplications(); }  }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfApplications(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getApplicationsList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getApplications(); }  @Override List<Map<String, Object>> getFiltersFromDb(int filterId); List<Map<String, Object>> getPoliciesFromDB(String targetTypes); Map<String, Long> getPoliciesFromES(String assetGroup); List<Map<String, Object>> getAccountsFromES(String assetGroup); Map<String, Long> getRegionsFromES(String assetGroup); Map<String, Long> getRulesFromES(String assetGroup); AssetCountDTO[] getListOfApplications(String assetGroup,
            String domain); AssetCountDTO[] getListOfEnvironments(String assetGroup,
            String application, String domain); AssetCountDTO[] getListOfTargetTypes(String assetGroup, String domain); }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfApplications(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getApplicationsList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getApplications(); }  @Override List<Map<String, Object>> getFiltersFromDb(int filterId); List<Map<String, Object>> getPoliciesFromDB(String targetTypes); Map<String, Long> getPoliciesFromES(String assetGroup); List<Map<String, Object>> getAccountsFromES(String assetGroup); Map<String, Long> getRegionsFromES(String assetGroup); Map<String, Long> getRulesFromES(String assetGroup); AssetCountDTO[] getListOfApplications(String assetGroup,
            String domain); AssetCountDTO[] getListOfEnvironments(String assetGroup,
            String application, String domain); AssetCountDTO[] getListOfTargetTypes(String assetGroup, String domain);  }