@Test
public void Should_rethrowExceptionAfterCheckingQueue_When_nestedReceiverThrows()
        throws Exception {

    MessageReceiveException exception = mock(MessageReceiveException.class);
    when(receiverQueueMock.isEmpty()).thenReturn(true);
    doAnswer(invocationOnMock -> {
        assertTrue(receiverFlag.get());
        throw exception;
    }).when(childReceiverMock).receive(same(processorMock));
    ActorReceiver actorReceiver = new ActorReceiver(childReceiverMock);
    try {
        actorReceiver.receive(processorMock);
        fail();
    } catch (MessageReceiveException e) {
        assertSame(exception, e.getCause());
    }
}