DashboardConfigHandler extends AbstractJsonRequestHandler implements LegacyRestHandler<DispatcherGateway, DashboardConfiguration, EmptyMessageParameters> { @Override public String[] getPaths() { return new String[]{DASHBOARD_CONFIG_REST_PATH}; } DashboardConfigHandler(Executor executor, long refreshInterval); @Override String[] getPaths(); @Override CompletableFuture<DashboardConfiguration> handleRequest(HandlerRequest<EmptyRequestBody, EmptyMessageParameters> request, DispatcherGateway gateway); @Override CompletableFuture<String> handleJsonRequest(Map<String, String> pathParams, Map<String, String> queryParams, JobManagerGateway jobManagerGateway); static String createConfigJson(DashboardConfiguration dashboardConfiguration); static final String DASHBOARD_CONFIG_REST_PATH; }
@Test public void testGetPaths() { DashboardConfigHandler handler = new DashboardConfigHandler(Executors.directExecutor(), 10000L); String[] paths = handler.getPaths(); Assert.assertEquals(1, paths.length); Assert.assertEquals("/config", paths[0]); }