@Test
public void Should_handleExceptionOccurredWhileCompletingAsynchronousOperationOnDelayedProcessor()
        throws Exception {

    MessageReceiveException messageReceiveExceptionMock = mock(MessageReceiveException.class);
    AsynchronousOperationException asynchronousOperationExceptionMock = mock(AsynchronousOperationException.class);
    when(receiverQueueMock.isEmpty()).thenAnswer(invocationOnMock -> {
        receiverFlag.set(false);
        return false;
    }).thenReturn(true);
    when(receiverQueueMock.poll()).thenReturn(processorMock).thenReturn(null);
    doThrow(messageReceiveExceptionMock).when(childReceiverMock).receive(same(processorMock));
    doThrow(asynchronousOperationExceptionMock).when(processorMock).continueProcess(same(messageReceiveExceptionMock));
    ActorReceiver actorReceiver = new ActorReceiver(childReceiverMock);
    receiverFlag.set(true);
    actorReceiver.receive(processorMock);
    verify(asynchronousOperationExceptionMock).printStackTrace();
    verify(asynchronousOperationExceptionMock).addSuppressed(messageReceiveExceptionMock);
}