CommandProcess { void start() throws CommandException { if ( status != CommandStatus.NEW ) { throw new CommandException( "Command is already started" ); } status = CommandStatus.RUNNING; executor = Executors.newSingleThreadExecutor(); } CommandProcess( final CommandProcessor commandProcessor, final CommandCallback callback, final Request request,
                    final String rhId, final Session userSession ); void stop();  }
@Test public void testStart() throws Exception { commandProcess.start(); assertEquals( CommandStatus.RUNNING, commandProcess.status ); commandProcess.status = CommandStatus.RUNNING; try { commandProcess.start(); fail( "Expected CommandException" ); } catch ( CommandException e ) { } }