@Test
public void checkInMethodWithTypeCastOnEqualRequiredTypeWithExisting()
        throws Exception {

    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");
}