@Test
public void Should_executeReceiversFromQueue_When_QueueIsNotEmptyAndActorIsNotBusy()
        throws Exception {

    IMessageProcessor[] processorMocks = new IMessageProcessor[] {
            mock(IMessageProcessor.class), mock(IMessageProcessor.class) };
    receiverFlag.set(false);
    doAnswer(invocationOnMock -> {
        assertTrue(receiverFlag.get());
        return null;
    }).when(childReceiverMock).receive(any());
    when(receiverQueueMock.isEmpty())
        .thenAnswer(invocationOnMock -> {
            assertFalse(receiverFlag.get());
            return false;
        })
        .thenAnswer(invocationOnMock -> {
            assertFalse(receiverFlag.get());
            return true;
        });
    when(receiverQueueMock.poll())
            .thenReturn(processorMocks[0])
            .thenReturn(processorMocks[1])
            .thenReturn(null);
    ActorReceiver actorReceiver = new ActorReceiver(childReceiverMock);
    actorReceiver.receive(processorMock);
    verify(childReceiverMock).receive(processorMock);
    verify(childReceiverMock).receive(processorMocks[0]);
    verify(childReceiverMock).receive(processorMocks[1]);
}