### Question:
ReflectionUtils { @SuppressWarnings("unchecked") public static <T> T newInstance(Class<T> pojoClass) { try { return instantiate(pojoClass); } catch (ReflectiveOperationException e) { throw new HecateException(e, "Unable to instantiate object of type %s.", pojoClass.getCanonicalName()); } } private  ReflectionUtils(); @SuppressWarnings("unchecked") static T newInstance(Class<T> pojoClass);  }### Answer:
@Test public void testNewInstance() { assertNotNull(ReflectionUtils.newInstance(MyPojo.class)); }
@Test(expected = HecateException.class) public void testNewInstanceWithAbstractType() { ReflectionUtils.newInstance(AbstractPojo.class); }
@Test public void testNewInstanceWithHiddenConstructor() { assertNotNull(ReflectionUtils.newInstance(PrivatePojo.class)); }
@Test public void testInstantiateWithNoConstructor() { assertNotNull(ReflectionUtils.newInstance(NoConstructorPerson.class)); }