@Test
public void checkMessageHandle()
        throws Exception {

    IResolveDependencyStrategy sequenceStrategy = mock(IResolveDependencyStrategy.class);
    IOC.register(
            IOC.resolve(IOC.getKeyForKeyStorage(), "info.smart_tools.smartactors.message_processing_interfaces.message_processing.IMessageProcessingSequence"),
            sequenceStrategy
    );
    IResolveDependencyStrategy messageProcessorStrategy = mock(IResolveDependencyStrategy.class);
    IOC.register(
            IOC.resolve(IOC.getKeyForKeyStorage(), "info.smart_tools.smartactors.message_processing_interfaces.message_processing.IMessageProcessor"),
            messageProcessorStrategy
    );
    IResolveDependencyStrategy iobjectStrategy = mock(IResolveDependencyStrategy.class);
    IOC.register(
            IOC.resolve(IOC.getKeyForKeyStorage(), "info.smart_tools.smartactors.iobject.iobject.IObject"),
            iobjectStrategy
    );
    IMessageProcessingSequence sequence = mock(IMessageProcessingSequence.class);
    when(sequenceStrategy.resolve(1, this.chain)).thenReturn(sequence);
    IMessageProcessor processor = mock(IMessageProcessor.class);
    when(messageProcessorStrategy.resolve(this.queue, sequence)).thenReturn(processor);
    IObject context = mock(IObject.class);
    when(iobjectStrategy.resolve()).thenReturn(context);
    IObject message = mock(IObject.class);
    IMessageBusHandler handler = new MessageBusHandler(this.queue, 1, this.chain, mock(IAction.class));
    handler.handle(message);
    verify(context, times(1)).setValue(eq(new FieldName("responseStrategy")), same(nullResponseStrategy));
    verify(sequenceStrategy, times(1)).resolve(1, this.chain);
    verify(messageProcessorStrategy, times(1)).resolve(this.queue, sequence);
    verify(iobjectStrategy, times(1)).resolve();
    verify(processor, times(1)).process(message, context);
}