@Test public void testGetAllDatabases() throws Exception { String dbName = "default"; given(hiveMetaStoreService.getAllDatabases()).willReturn(Arrays .asList(dbName)); mockMvc.perform(get(URLHelper.API_VERSION_PATH + "/metadata/hive/dbs")) .andExpect(status().isOk()) .andExpect(jsonPath("$.[0]", is(dbName))); }
@RequestMapping(value = "/dbs", method = RequestMethod.GET) public Iterable<String> getAllDatabases() { return hiveMetaStoreService.getAllDatabases(); }
HiveMetaStoreController { @RequestMapping(value = "/dbs", method = RequestMethod.GET) public Iterable<String> getAllDatabases() { return hiveMetaStoreService.getAllDatabases(); } }
HiveMetaStoreController { @RequestMapping(value = "/dbs", method = RequestMethod.GET) public Iterable<String> getAllDatabases() { return hiveMetaStoreService.getAllDatabases(); }  }
HiveMetaStoreController { @RequestMapping(value = "/dbs", method = RequestMethod.GET) public Iterable<String> getAllDatabases() { return hiveMetaStoreService.getAllDatabases(); }  @RequestMapping(value = "/dbs", method = RequestMethod.GET) Iterable<String> getAllDatabases(); @RequestMapping(value = "/tables/names", method = RequestMethod.GET) Iterable<String> getAllTableNames(@RequestParam("db") String dbName); @RequestMapping(value = "/tables", method = RequestMethod.GET) List<Table> getAllTables(@RequestParam("db") String dbName); @RequestMapping(value = "/dbs/tables", method = RequestMethod.GET) Map<String, List<Table>> getAllTables(); @RequestMapping(value = "/dbs/tables/names", method = RequestMethod.GET) Map<String, List<String>> getAllTableNames(); @RequestMapping(value = "/table", method = RequestMethod.GET) Table getTable(@RequestParam("db") String dbName,
                          @RequestParam("table") String tableName); }
HiveMetaStoreController { @RequestMapping(value = "/dbs", method = RequestMethod.GET) public Iterable<String> getAllDatabases() { return hiveMetaStoreService.getAllDatabases(); }  @RequestMapping(value = "/dbs", method = RequestMethod.GET) Iterable<String> getAllDatabases(); @RequestMapping(value = "/tables/names", method = RequestMethod.GET) Iterable<String> getAllTableNames(@RequestParam("db") String dbName); @RequestMapping(value = "/tables", method = RequestMethod.GET) List<Table> getAllTables(@RequestParam("db") String dbName); @RequestMapping(value = "/dbs/tables", method = RequestMethod.GET) Map<String, List<Table>> getAllTables(); @RequestMapping(value = "/dbs/tables/names", method = RequestMethod.GET) Map<String, List<String>> getAllTableNames(); @RequestMapping(value = "/table", method = RequestMethod.GET) Table getTable(@RequestParam("db") String dbName,
                          @RequestParam("table") String tableName);  }