### Question:
ReflectionUtils { public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) { logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign }); validateParams(type, objectToInvokeUpon, valueToAssign); checkArgument(ClassUtils.isPrimitiveWrapper(type), type.getName() + " is NOT a wrapper data type."); try { Object objectToReturn = type.getConstructor(new Class<?>[] { String.class }).newInstance(valueToAssign); logger.exiting(objectToInvokeUpon); return objectToReturn; } catch (InstantiationException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { throw new ReflectionException(e); } } private  ReflectionUtils(); static boolean hasOneArgStringConstructor(Class<?> type); static boolean hasDefaultConstructor(Class<?> type); static Object instantiateDefaultCustomTypeArray(DefaultCustomType type, String[] values); static Object instantiatePrimitiveArray(Class<?> type, String[] values); static Object instantiatePrimitiveObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign); static Object instantiateWrapperArray(Class<?> type, String[] values); static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign); static boolean isPrimitiveArray(Class<?> type); static boolean isWrapperArray(Class<?> type);  }### Answer:
@Test(groups = "unit") public void testInstantiateWrapperObject() { Object myint = ReflectionUtils.instantiateWrapperObject(Integer.class, new Integer(0), "5"); assertTrue(myint != null); assertTrue(myint instanceof Integer); assertTrue(((Integer) myint).intValue() == 5); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testInstantiateWrapperObjectErrorCondition1() { ReflectionUtils.instantiateWrapperObject(String.class, new Integer(0), "5"); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testInstantiateWrapperObjectErrorCondition2() { ReflectionUtils.instantiateWrapperObject(null, new Integer(0), "5"); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testInstantiateWrapperObjectErrorCondition3() { ReflectionUtils.instantiateWrapperObject(Integer.class, null, "5"); }
@Test(groups = "unit", expectedExceptions = { IllegalArgumentException.class }) public void testInstantiateWrapperObjectErrorCondition4() { ReflectionUtils.instantiateWrapperObject(Integer.class, new Integer(0), null); }
@Test(groups = "unit", expectedExceptions = { ReflectionException.class }) public void testInstantiateWrapperObjectErrorCondition5() { ReflectionUtils.instantiateWrapperObject(Integer.class, new Integer(0), ""); }
@Test(groups = "unit", expectedExceptions = { ReflectionException.class }) public void testInstantiateWrapperObjectErrorCondition6() { ReflectionUtils.instantiateWrapperObject(Integer.class, new Integer(0), "selion"); }