@Test public void getListOfEnvironmentsTest()throws Exception{ AssetApi assetApi = new AssetApi(); AssetApiData apidata = new AssetApiData(); AssetCountDTO environments = new AssetCountDTO(); AssetCountDTO[] applications = new AssetCountDTO[]{environments}; environments.setName("dev"); environments.setName("prod"); apidata.setApplications(applications); assetApi.setData(apidata); when( assetServiceClient.getEnvironmentList(anyString(),anyString(),anyString())).thenReturn(assetApi); filterRepositoryImpl.getListOfEnvironments("aws-all", null, "1"); }
public AssetCountDTO[] getListOfEnvironments(String assetGroup, String application, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getEnvironmentList(assetGroup, application, domain); AssetApiData data = asstApi.getData(); return data.getEnvironments(); }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfEnvironments(String assetGroup, String application, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getEnvironmentList(assetGroup, application, domain); AssetApiData data = asstApi.getData(); return data.getEnvironments(); } }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfEnvironments(String assetGroup, String application, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getEnvironmentList(assetGroup, application, domain); AssetApiData data = asstApi.getData(); return data.getEnvironments(); }  }
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfEnvironments(String assetGroup, String application, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getEnvironmentList(assetGroup, application, domain); AssetApiData data = asstApi.getData(); return data.getEnvironments(); }  @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[] getListOfEnvironments(String assetGroup, String application, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getEnvironmentList(assetGroup, application, domain); AssetApiData data = asstApi.getData(); return data.getEnvironments(); }  @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);  }