@Test
public void throwRuntimeExceptionOrError() {

    try {
        ExceptionUtil.throwRuntimeExceptionOrError(new Exception("test"));
        fail();
    } catch (RuntimeException e) {
        assertEquals("test", e.getCause().getMessage());
    }
    try {
        ExceptionUtil.throwRuntimeExceptionOrError(new RuntimeException("test"));
        fail();
    } catch (RuntimeException e) {
        assertEquals("test", e.getMessage());
    }
    try {
        ExceptionUtil.throwRuntimeExceptionOrError(new Error("test"));
        fail();
    } catch (Error e) {
        assertEquals("test", e.getMessage());
    }
}