### Question:
Reflection { public static <T> T instantiate( Constructor<T> constructor, Object... args ) { try { return constructor.newInstance( args ); } catch ( Exception ex ) { throw reflectionException( ex ); } } private  Reflection(); static ValueConverter<V> findConverter( Class<V> clazz ); static T instantiate( Constructor<T> constructor, Object... args ); static Object invoke( Method method, Object... args ); @SuppressWarnings( "unchecked" ) static V convertWith( ValueConverter<V> converter, String raw );  }### Answer:
@Test public void invokingConstructorQuietlyWrapsInstantiationException() throws Exception { Constructor<AbstractProblematic> constructor = AbstractProblematic.class.getDeclaredConstructor(); thrown.expect( ReflectionException.class ); thrown.expectMessage( InstantiationException.class.getName() ); instantiate( constructor ); }
@Test public void invokingConstructorQuietlyWrapsIllegalAccessException() throws Exception { Constructor<Problematic> constructor = Problematic.class.getDeclaredConstructor(); thrown.expect( ReflectionException.class ); thrown.expectMessage( IllegalAccessException.class.getName() ); instantiate( constructor ); }
@Test public void invokingConstructorQuietlyWrapsCauseOfInvocationTargetException() throws Exception { Constructor<Problematic> constructor = Problematic.class.getDeclaredConstructor( String.class ); thrown.expect( ReflectionException.class ); thrown.expectMessage( IllegalStateException.class.getName() ); instantiate( constructor, "arg" ); }
@Test public void invokingConstructorQuietlyWrapsIllegalArgumentException() throws Exception { Constructor<Problematic> constructor = Problematic.class.getDeclaredConstructor(String.class); thrown.expect( ReflectionException.class ); thrown.expectMessage( IllegalArgumentException.class.getName() ); instantiate( constructor ); }