ExceptionHelper { public static void rethrowCoreException(Throwable e) throws CoreException { rethrowCoreException(e.getMessage(), e); }  static void rethrowCoreException(Throwable e); static CoreException wrapCoreException(Throwable e); static void rethrowServiceException(Throwable e); static ServiceException wrapServiceException(Throwable e); static void rethrowProduceException(Throwable e); static ProduceException wrapProduceException(Throwable e); static void rethrowCoreException(String msg, Throwable e); static CoreException wrapCoreException(String msg, Throwable e); static void rethrowServiceException(String msg, Throwable e); static ServiceException wrapServiceException(String msg, Throwable e); static void rethrowProduceException(String msg, Throwable e); static ProduceException wrapProduceException(String msg, Throwable e);  }
@Test public void testRethrowCoreExceptionThrowable() { Exception c1 = new Exception(); try { rethrowCoreException(c1); fail(); } catch (CoreException e) { assertEquals(c1, e.getCause()); } CoreException c2 = new CoreException(); try { rethrowCoreException(c2); fail(); } catch (CoreException e) { assertEquals(c2, e); } }