@Test public void testGetMetricNameListByOrg() throws Exception { String org = "hadoop"; when(measureOrgService.getMetricNameListByOrg(org)).thenReturn(Arrays .asList(org)); mockMvc.perform(get(URLHelper.API_VERSION_PATH + "/org/{org}", org)) .andExpect(status().isOk()) .andExpect(jsonPath("$.[0]", is(org))); }
@RequestMapping(value = "/org/{org}", method = RequestMethod.GET) public List<String> getMetricNameListByOrg(@PathVariable("org") String org) { return measureOrgService.getMetricNameListByOrg(org); }
MeasureOrgController { @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) public List<String> getMetricNameListByOrg(@PathVariable("org") String org) { return measureOrgService.getMetricNameListByOrg(org); } }
MeasureOrgController { @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) public List<String> getMetricNameListByOrg(@PathVariable("org") String org) { return measureOrgService.getMetricNameListByOrg(org); }  }
MeasureOrgController { @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) public List<String> getMetricNameListByOrg(@PathVariable("org") String org) { return measureOrgService.getMetricNameListByOrg(org); }  @RequestMapping(value = "/org", method = RequestMethod.GET) List<String> getOrgs(); @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) List<String> getMetricNameListByOrg(@PathVariable("org") String org); @RequestMapping(value = "/org/measure/names", method = RequestMethod.GET) Map<String, List<String>> getMeasureNamesGroupByOrg(); }
MeasureOrgController { @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) public List<String> getMetricNameListByOrg(@PathVariable("org") String org) { return measureOrgService.getMetricNameListByOrg(org); }  @RequestMapping(value = "/org", method = RequestMethod.GET) List<String> getOrgs(); @RequestMapping(value = "/org/{org}", method = RequestMethod.GET) List<String> getMetricNameListByOrg(@PathVariable("org") String org); @RequestMapping(value = "/org/measure/names", method = RequestMethod.GET) Map<String, List<String>> getMeasureNamesGroupByOrg();  }