Code example for InvocationTargetException

0
		RuntimeException e = Reflections.convertReflectionExceptionToUnchecked(iae);
		assertEquals(iae, e.getCause());
 
		//InvocationTargetException,extract it's target exception. 
		Exception ex = new Exception();
		e = Reflections.convertReflectionExceptionToUnchecked(new InvocationTargetException(ex));
		assertEquals(ex, e.getCause());
 
		//UncheckedException, ignore it. 
		RuntimeException re = new RuntimeException("abc");
		e = Reflections.convertReflectionExceptionToUnchecked(re);
		assertEquals("abc", e.getMessage());
 
		//Unexcepted Checked exception. 
		e = Reflections.convertReflectionExceptionToUnchecked(ex);
		assertEquals("Unexpected Checked Exception.", e.getMessage());
 
	} 
 
	public static class ParentBean<T, ID> { 
	}