@Test
public void Should_replaceSomeReceiversByWrappers()
        throws Exception {

    chain = mock(IReceiverChain.class);
    when(chain.get(0)).thenReturn(receivers[0]);
    when(chain.get(1)).thenReturn(receivers[1]);
    when(chain.get(2)).thenReturn(receivers[2]);
    ISensorHandle handle = new EmbeddedSensorCreationStrategy().resolve("stat_chain", IOC.resolve(
            Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject"),
            ("{" +
                    "'chain':'the_chain'," +
                    "'args':{}," +
                    "'embed':[" +
                    "   {" +
                    "       'step':0," +
                    "       'dependency':'additional sensor'" +
                    "   }," +
                    "   {" +
                    "       'step':2" +
                    "   }" +
                    "]" +
                    "}").replace('\'','"')
    ));
    assertNotNull(handle);
    chain.get(0).receive(processor);
    verify(receivers[0], times(1)).receive(processor);
    verify(receivers[8], times(1)).receive(processor);
    chain.get(2).receive(processor);
    verify(receivers[2], times(1)).receive(processor);
    verify(receivers[9], times(1)).receive(processor);
}