ExecAsyncCommand extends SubutaiShellCommandSupport { @Override protected Object doExecute() throws CommandException { RequestBuilder requestBuilder = new RequestBuilder( command ).withTimeout( timeout ); executor.executeAsync( hostId, daemon ? requestBuilder.daemon() : requestBuilder, new CommandCallback() { @Override public void onResponse( final Response response, final CommandResult commandResult ) { log.info( response.toString() ); } } ); return null; } ExecAsyncCommand( final CommandExecutor executor );   }
@Test public void testDoExecute() throws Exception { command.doExecute(); verify( commandExecutor ) .executeAsync( any( String.class ), any( RequestBuilder.class ), isA( CommandCallback.class ) ); }