### Question:
ReflectionUtils { public Object getFieldValue(final Object target, final Field field) { return getFieldValue(target, field.getName(), field.getType()); }  Object invokeMethod(final Method method, final Object target, final Object... args); boolean isSetter(final Method method); boolean isGetter(final Method method); Object getFieldValue(final Object target, final Field field); @SuppressWarnings("unchecked") Object getFieldValue(final Object target, final String fieldName, final Class<?> fieldType); A getFieldAnnotation(final Field field, final Class<A> annotationClazz); A getParameterAnnotation(final Parameter parameter, final Class<A> annotationClazz, final String declaringClassName); Field getDeclaredField(final String fieldName, final Class<?> targetClass); Class<?> getDeclaredFieldType(final String fieldName, final Class<?> clazz); void setFieldValue(final Object target, final String fieldName, final Object fieldValue); void setFieldValue(final Object target, final Field field, final Object fieldValue); Method getSetterMethodForField(final Class<?> fieldClass, final String fieldName, final Class<?> fieldType); Class<?> getGenericFieldType(final Field field); MapType getMapGenericType(final Type fieldType, final String declaringClass, final String fieldName); Class<?> getArgumentTypeClass(final Object argument, final String declaringClass, final String fieldName, final boolean getNestedGenericClass); Class<?> getArrayType(final Field arrayField);  }### Answer:
@Test(dataProvider = "dataGetFieldValueTesting") public void testGetFieldValueWorksAsExpected(final String testCaseDescription, final Object beanObject, final String fieldName, final Class<?> fieldType, final Object expectedResult) { Object actual = underTest.getFieldValue(beanObject, fieldName, fieldType); assertThat(actual).isEqualTo(expectedResult); }
@Test(expectedExceptions = MissingFieldException.class) public void testGetFieldValueThrowsExceptionIfTheFieldDoesNotExists() { MutableToFoo mutableToFoo = createMutableToFoo(null); underTest.getFieldValue(mutableToFoo, NOT_EXISTING_FIELD_NAME, Object.class); }