@Test
public void toRuntimeException() {

    // null
    assertNull(ExceptionUtil.toRuntimeException(null));
    // wrong class
    assertEquals(RuntimeException.class,
            ExceptionUtil.toRuntimeException(new Exception(), PrivateRuntimeException.class).getClass());
    IllegalArgumentException iae = new IllegalArgumentException();
    IOException ioe = new IOException();
    assertSame(iae, ExceptionUtil.toRuntimeException(iae));
    assertTrue(ExceptionUtil.toRuntimeException(ioe) instanceof RuntimeException);
    assertSame(ioe, ExceptionUtil.toRuntimeException(ioe).getCause());
}