GridLogCommandHandler extends GridRestCommandHandlerAdapter { @Override public Collection<GridRestCommand> supportedCommands() { return SUPPORTED_COMMANDS; } GridLogCommandHandler(GridKernalContext ctx); @Override Collection<GridRestCommand> supportedCommands(); @Override IgniteInternalFuture<GridRestResponse> handleAsync(GridRestRequest req);  }
@Test public void testSupportedCommands() throws Exception { GridLogCommandHandler cmdHandler = new GridLogCommandHandler(newContext()); Collection<GridRestCommand> commands = cmdHandler.supportedCommands(); assertEquals(1, commands.size()); assertTrue(commands.contains(GridRestCommand.LOG)); }
@Test public void testUnSupportedCommands() throws Exception { GridLogCommandHandler cmdHandler = new GridLogCommandHandler(newContext()); Collection<GridRestCommand> commands = cmdHandler.supportedCommands(); assertEquals(1, commands.size()); assertFalse(commands.contains(GridRestCommand.VERSION)); }