DebuggerSequenceImpl implements IDebuggerSequence, IDumpable { @Override public IObject dump(final IObject options) throws DumpException, InvalidArgumentException { try { return IOC.resolve(Keys.getOrAdd("make dump"), wrapped, options); } catch (ResolutionException e) { throw new DumpException("Error creating dump of debugger sequence.", e); } } DebuggerSequenceImpl(final IMessageProcessingSequence sequence, final Object debuggerAddress); @Override boolean isExceptionOccurred(); @Override boolean isCompleted(); @Override void stop(); @Override Throwable getException(); @Override boolean processException(); @Override IMessageProcessingSequence getRealSequence(); @Override void reset(); @Override boolean next(); @Override void goTo(final int level, final int step); @Override void end(); @Override int getCurrentLevel(); @Override int getStepAtLevel(final int level); @Override IMessageReceiver getCurrentReceiver(); @Override IObject getCurrentReceiverArguments(); @Override void callChain(final IReceiverChain chain); @Override void catchException(final Throwable exc, final IObject context); @Override IObject dump(final IObject options);  }
@Test public void Should_createDumpOfUnderlyingSequence() throws Exception { IObject options = mock(IObject.class); IObject dump = mock(IObject.class); when(dumpCreationStrategy.resolve(same(sequenceMock), same(options))).thenReturn(dump); IObject doneDump = new DebuggerSequenceImpl(sequenceMock, debuggerAddress).dump(options); assertSame(dump, doneDump); }