@Test(expected = NestedChainStackOverflowException.class)
public void Should_throw_When_stackOverflowOccurs()
        throws Exception {

    when(mainChainMock.get(eq(0))).thenReturn(messageReceiverMocks[0]);
    IMessageProcessingSequence messageProcessingSequence = new MessageProcessingSequence(4, mainChainMock);
    try {
        messageProcessingSequence.callChain(mainChainMock);
        messageProcessingSequence.callChain(mainChainMock);
        messageProcessingSequence.callChain(mainChainMock);
    } catch (NestedChainStackOverflowException e) {
        fail();
    }
    messageProcessingSequence.callChain(mainChainMock);
}