@Test public void testGetMetricNameListByOrg() { String orgName = "orgName"; String measureName = "measureName"; given(measureRepo.findNameByOrganization(orgName, false)) .willReturn(Arrays.asList(measureName)); List<String> measureNames = service.getMetricNameListByOrg(orgName); assertThat(measureNames.size()).isEqualTo(1); assertThat(measureNames.get(0)).isEqualTo(measureName); }
@Override public List<String> getMetricNameListByOrg(String org) { List<String> orgs = measureRepo.findNameByOrganization(org, false); if (CollectionUtils.isEmpty(orgs)) { throw new GriffinException.NotFoundException (ORGANIZATION_NAME_DOES_NOT_EXIST); } return orgs; }
MeasureOrgServiceImpl implements MeasureOrgService { @Override public List<String> getMetricNameListByOrg(String org) { List<String> orgs = measureRepo.findNameByOrganization(org, false); if (CollectionUtils.isEmpty(orgs)) { throw new GriffinException.NotFoundException (ORGANIZATION_NAME_DOES_NOT_EXIST); } return orgs; } }
MeasureOrgServiceImpl implements MeasureOrgService { @Override public List<String> getMetricNameListByOrg(String org) { List<String> orgs = measureRepo.findNameByOrganization(org, false); if (CollectionUtils.isEmpty(orgs)) { throw new GriffinException.NotFoundException (ORGANIZATION_NAME_DOES_NOT_EXIST); } return orgs; }  }
MeasureOrgServiceImpl implements MeasureOrgService { @Override public List<String> getMetricNameListByOrg(String org) { List<String> orgs = measureRepo.findNameByOrganization(org, false); if (CollectionUtils.isEmpty(orgs)) { throw new GriffinException.NotFoundException (ORGANIZATION_NAME_DOES_NOT_EXIST); } return orgs; }  @Override List<String> getOrgs(); @Override List<String> getMetricNameListByOrg(String org); @Override Map<String, List<String>> getMeasureNamesGroupByOrg(); @Override Map<String, Map<String, List<Map<String, Object>>>> getMeasureWithJobDetailsGroupByOrg(Map<String,
        List<Map<String, Object>>> jobDetails); }
MeasureOrgServiceImpl implements MeasureOrgService { @Override public List<String> getMetricNameListByOrg(String org) { List<String> orgs = measureRepo.findNameByOrganization(org, false); if (CollectionUtils.isEmpty(orgs)) { throw new GriffinException.NotFoundException (ORGANIZATION_NAME_DOES_NOT_EXIST); } return orgs; }  @Override List<String> getOrgs(); @Override List<String> getMetricNameListByOrg(String org); @Override Map<String, List<String>> getMeasureNamesGroupByOrg(); @Override Map<String, Map<String, List<Map<String, Object>>>> getMeasureWithJobDetailsGroupByOrg(Map<String,
        List<Map<String, Object>>> jobDetails);  }