### Question:
ClassInstantiation { public <T> T newInstance(final Class<T> clazz) { try { return clazz.newInstance(); } catch (final InstantiationException e) { throw new RuntimeException(e); } catch (final IllegalAccessException e) { throw new RuntimeException(e); } }  T newInstance(final Class<T> clazz);  }### Answer:
@Test public void testNew() { final TestBean t = cinst.newInstance(TestBean.class); Assert.assertNotNull("could not create a new instance", t); }
@Test(expected = RuntimeException.class) public void testNewNonDefConstructor() { final TestBean2 t = cinst.newInstance(TestBean2.class); t.getName(); }