### Question:
IntrospectionSupport { public static boolean setProperty(Object target, String name, Object value) { try { Class<?> clazz = target.getClass(); if (target instanceof SSLServerSocket) { clazz = SSLServerSocket.class; } Method setter = findSetterMethod(clazz, name); if (setter == null) { return false; } if (value == null || value.getClass() == setter.getParameterTypes()[0]) { setter.invoke(target, value); } else { setter.invoke(target, convert(value, setter.getParameterTypes()[0])); } return true; } catch (Exception e) { LOG.error(String.format("Could not set property %s on %s", name, target), e); return false; } } private  IntrospectionSupport(); static boolean getProperties(Object target, Map props, String optionPrefix); static boolean setProperties(Object target, Map<String, ?> props, String optionPrefix); static Map<String, Object> extractProperties(Map props, String optionPrefix); static boolean setProperties(Object target, Map<?, ?> props); static boolean setProperties(Object target, Map<?, ?> props, boolean removeIfSet); static boolean setProperty(Object target, String name, Object value); static String convertToString(Object value, Class to); static Method findSetterMethod(Class clazz, String name); static Method findGetterMethod(Class clazz, String name); static String toString(Object target); static String toString(Object target, Class stopClass); static String toString(Object target, Class stopClass, Map<String, Object> overrideFields); static String simpleName(Class clazz);  }### Answer:
@Test public void testSetPropertyPrimitiveWithWrapperValue() { Boolean value = Boolean.valueOf(true); DummyClass dummyClass = new DummyClass(false); dummyClass.setTrace(false); IntrospectionSupport.setProperty(dummyClass, "trace", value); assertTrue(dummyClass.isTrace()); }