// assertFieldFalseToTrue(field, new ReflectionCaseNoMagic.Subclass());
// }
@Test
public void testDirectInjection_Visibility() throws Exception{
ReflectionCaseNoMagic superCase = new ReflectionCaseNoMagic();
ReflectionCaseNoMagic.Subclass subCase = new ReflectionCaseNoMagic.Subclass();
Field superField = NO_MAGIC.getField(OVERRIDE_FIELD);
Field publicField = NO_MAGIC_SUBCLASS.getField(OVERRIDE_FIELD);
Field declaredField = NO_MAGIC_SUBCLASS.getDeclaredField(OVERRIDE_FIELD);
declaredField.setAccessible(true);
assertFalse(declaredField.getBoolean(subCase));
assertFalse(publicField.getBoolean(superCase));
assertFalse(publicField.getBoolean(subCase));
assertFalse(superField.getBoolean(subCase));
assertFalse(superField.getBoolean(superCase));
publicField.setBoolean(superCase, true);
superField.setBoolean(subCase, true);
assertTrue(superCase.overrideField);
assertTrue(superCase.overrideField());
assertTrue(subCase.overrideField());
assertFalse(Subclass.getOverrideField(subCase));
assertTrue(publicField.getBoolean(superCase));
assertTrue(publicField.getBoolean(subCase));