### Question:
ReflectionUtils { public static void invokeSetter(Object target, String property, Object parameter) { Method setter = getSetter(target, property, parameter.getClass()); try { setter.invoke(target, parameter); } catch (IllegalAccessException e) { throw handleException(setter.getName(), e); } catch (InvocationTargetException e) { throw handleException(setter.getName(), e); } } private  ReflectionUtils(); static Class<T> getClass(String className); static Class<T> getClassOrNull(String className); static T getFieldValue(Object target, String fieldName); static void setFieldValue(Object target, String fieldName, Object value); static Method getMethod(Object target, String methodName, Class... parameterTypes); static boolean hasMethod(Class<?> targetClass, String methodName, Class... parameterTypes); static Method getGetter(Object target, String property); static Method getSetter(Object target, String property, Class<?> parameterType); static T invoke(Object target, Method method, Object... parameters); static T invokeGetter(Object target, String property); static void invokeSetter(Object target, String property, Object parameter); static final String GETTER_PREFIX; static final String SETTER_PREFIX; }### Answer:
@Test public void testInvokeSetter() { TestObject testObject = new TestObject(); ReflectionUtils.invokeSetter(testObject, "version", 12); assertEquals(12, (int) ReflectionUtils.getFieldValue(testObject, "version")); }