DebuggerActor { public void interrupt(final DebuggableMessage message) throws ReadValueException, SessionNotFoundException, InterruptProcessingException { getSession(message.getSessionId()).handleInterrupt(message.getProcessor()); }  void executeCommand(final CommandMessage message); void interrupt(final DebuggableMessage message);  }
@Test public void Should_processInterrupt() throws Exception { DebuggerActor actor = new DebuggerActor(); String id = doCreateSession(actor, session[0]); when(debuggableMessageMock.getSessionId()).thenReturn(id); when(debuggableMessageMock.getProcessor()).thenReturn(messageProcessorMock); actor.interrupt(debuggableMessageMock); verify(session[0]).handleInterrupt(same(messageProcessorMock)); }