### Question:
Reflection { public static Field findField(Class<?> type, String fieldName) { try { return type.getDeclaredField(fieldName); } catch (NoSuchFieldException ex) { throw reflectionException(ex); } } private  Reflection(); static Class<?> maybeWrap(Class<?> clazz); static Constructor<T> findConstructor(
        Class<T> type,
        Class<?>... parameterTypes); static Constructor<T> findDeclaredConstructor(
        Class<T> type,
        Class<?>... parameterTypes); @SuppressWarnings("unchecked") static Constructor<T> singleAccessibleConstructor(
        Class<T> type); static T instantiate(Class<T> clazz); static T instantiate(Constructor<T> ctor, Object... args); static Set<Type<?>> supertypes(Type<?> bottom); static Object defaultValueOf(
        Class<? extends Annotation> annotationType,
        String attribute); static List<Annotation> allAnnotations(AnnotatedElement e); static List<T> allAnnotationsByType(
        AnnotatedElement e,
        Class<T> type); static Method findMethod(
        Class<?> target,
        String methodName,
        Class<?>... argTypes); static Object invoke(Method method, Object target, Object... args); static Field findField(Class<?> type, String fieldName); static List<Field> allDeclaredFieldsOf(Class<?> type); static void setField(
        Field field,
        Object target,
        Object value,
        boolean suppressProtection); static boolean jdk9OrBetter(); static Method singleAbstractMethodOf(Class<?> rawClass); static boolean isMarkerInterface(Class<?> clazz); static RuntimeException reflectionException(Exception ex); static List<AnnotatedType> annotatedComponentTypes(
        AnnotatedType annotatedType);  }### Answer:
@Test public void findingField() { Field i = findField(Parent.class, "i"); assertEquals(int.class, i.getType()); }
@Test public void findingNonExistentField() { thrown.expect(ReflectionException.class); thrown.expectMessage(NoSuchFieldException.class.getName()); findField(Parent.class, "missing"); }