### Question:
FilterRepositoryImpl implements FilterRepository, Constants { public AssetCountDTO[] getListOfTargetTypes(String assetGroup, String domain) throws DataException { AssetApi asstApi = assetServiceClient.getTargetTypeList(assetGroup, domain); AssetApiData data = asstApi.getData(); return data.getTargettypes(); }  @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);  }### Answer:
@Test public void getListOfTargetTypesTest()throws Exception{ AssetApi assetApi = new AssetApi(); AssetApiData apidata = new AssetApiData(); AssetCountDTO targetTypes = new AssetCountDTO(); AssetCountDTO[] applications = new AssetCountDTO[]{targetTypes}; targetTypes.setName("ec2"); targetTypes.setName("s3"); apidata.setApplications(applications); assetApi.setData(apidata); when( assetServiceClient.getTargetTypeList(anyString(), anyString())).thenReturn(assetApi); filterRepositoryImpl.getListOfTargetTypes("aws-all", "1"); }