### Question:
ReflectionHelper { public static <T> void setValueInFieldOfType(Object on, Class<? super T> fieldType, T newValue) { Field field = getOnlyFieldDefOfType(on.getClass(), fieldType); try { field.setAccessible(true); field.set(on, newValue); } catch (IllegalAccessException e) { throw new AssertionError(e); } } private  ReflectionHelper(); static void setValueInFieldOfType(Object on, Class<? super T> fieldType, T newValue); static T getValueInFieldOfType(Object on, Class<T> fieldType);  }### Answer:
@Test public void testSet() { Monkey monkey = new Monkey(); monkey.isClimbing = false; assertEquals(false, monkey.isClimbing); ReflectionHelper.setValueInFieldOfType(monkey, boolean.class, true); assertEquals(true, monkey.isClimbing); }