ClusterController { @RequestMapping(method = RequestMethod.GET) public ClusterInfoResponse clusterInfo() { ClusterInfoResponse response = new ClusterInfoResponse(); response.name = configuration.getTaskName(); response.configuration = toMap(configuration); return response; }  @RequestMapping(method = RequestMethod.GET) ClusterInfoResponse clusterInfo(); @RequestMapping(value = "/scheduler", method = RequestMethod.GET) ClusterSchedulerInfoResponse schedulerInfo(); @RequestMapping(value = "/elasticsearchNodes", method = RequestMethod.GET) @ResponseBody ElasticsearchNodesWrapper getElasticsearchNodes(); @RequestMapping(value = "/elasticsearchNodes", method = RequestMethod.PUT) void putElasticsearchNodes(@RequestBody ElasticsearchNodesWrapper elasticsearchNodes); @RequestMapping(value = "/executors", method = RequestMethod.GET) ClusterExecutorsInfoResponse executorsInfo(); static final Logger LOGGER; }
@Test public void shouldNotExceptionWhenGeneratingConfiguration() { clusterController.clusterInfo(); }
@Test public void shouldNotHaveErrorInText() { clusterController.clusterInfo().configuration.values().forEach(v -> assertFalse(v.toString().contains("ERROR"))); }
@Test public void willNotExposePasswordFieldsFromConfigurationInClearText() throws Exception { assertEquals("************", clusterController.clusterInfo().configuration.get("FakePassword")); }