DebuggerSessionImpl implements IDebuggerSession { @Override public void close() { if (isRunning() || isPaused()) { sequence.stop(); } } DebuggerSessionImpl(final String id, final Object debuggerAddress); @Override void handleInterrupt(final IMessageProcessor messageProcessor); @Override Object executeCommand(final String name, final Object args); @Override void close();  }
@Test public void Should_stopSequenceWhenClosed() throws Exception { Should_startDebugging(); session.close(); verify(debuggerSequenceMock).stop(); }