CommandProcess { CommandResult waitResult() { try { semaphore.acquire(); } catch ( InterruptedException e ) { Thread.currentThread().interrupt(); } return getResult(); } CommandProcess( final CommandProcessor commandProcessor, final CommandCallback callback, final Request request,
                    final String rhId, final Session userSession ); void stop();  }
@Test public void testWaitResult() throws Exception { CommandResult result = commandProcess.waitResult(); verify( semaphore ).acquire(); assertNotNull( result ); }