@Test
public void checkInMethodWithTypeCast()
        throws Exception {

    IResolveDependencyStrategy strategy = mock(IResolveDependencyStrategy.class);
    when(strategy.resolve(1)).thenReturn("1");
    IOC.register(
            IOC.resolve(IOC.getKeyForKeyStorage(), String.class.getCanonicalName() + "convert"),
            strategy
    );
    IField field = new Field(new FieldName("a"));
    IObject env = mock(IObject.class);
    when(env.getValue(new FieldName("a"))).thenReturn(1);
    String result = field.in(env, String.class);
    assertEquals(result, "1");
}