ExecSyncCommand extends SubutaiShellCommandSupport { @Override protected Object doExecute() throws CommandException { RequestBuilder requestBuilder = new RequestBuilder( command ).withTimeout( timeout ); CommandResult result = executor.execute( hostId, daemon ? requestBuilder.daemon() : requestBuilder ); System.out.println( result ); return null; } ExecSyncCommand( final CommandExecutor executor );   }
@Test public void testDoExecute() throws Exception { command.doExecute(); verify( commandExecutor ).execute( any( String.class ), any( RequestBuilder.class ) ); assertThat( getSysOut(), containsString( commandResult.toString() ) ); }