@Test
public void checkCreation()
        throws Exception {

    CustomActor a = new CustomActor();
    CustomWrapper w = new CustomWrapper();
    w.setGetterUsed(false);
    w.setSetterUsed(false);
    IResolveDependencyStrategy returnCustomActorStrategy = mock(IResolveDependencyStrategy.class);
    IResolveDependencyStrategy returnWrapperStrategy = mock(IResolveDependencyStrategy.class);
    IOC.register(Keys.getOrAdd("actorID"), returnCustomActorStrategy);
    IOC.register(Keys.getOrAdd(ICustomWrapper.class.getCanonicalName()), returnWrapperStrategy);
    when(returnCustomActorStrategy.resolve()).thenReturn(a);
    when(returnWrapperStrategy.resolve()).thenReturn(w);
    IObject configs = mock(IObject.class);
    IObject env = mock(IObject.class);
    IObject wrapperConfig = mock(IObject.class);
    when(env.getValue(new FieldName("int"))).thenReturn(1);
    doNothing().when(env).setValue(new FieldName("int"), 2);
    IMessageProcessor processor = mock(IMessageProcessor.class);
    when(processor.getEnvironment()).thenReturn(w);
    IReceiverGenerator rg = new ReceiverGenerator(null);
    assertNotNull(rg);
    IResolveDependencyStrategy strategy = mock(IResolveDependencyStrategy.class);
    when(strategy.resolve()).thenReturn(w);
    IMessageReceiver r = rg.generate(a, strategy, "doSomeWork");
    assertNotNull(r);
    r.receive(processor);
    assertTrue(w.getGetterUsed());
    assertTrue(w.getSetterUsed());
}