utils/src/main/java/org/robolectric/util/Util.java
@SuppressWarnings("unchecked")
  public static <T extends Throwable> RuntimeException sneakyThrow(Throwable t) throws T {
    throw (T) t;
  }
@SuppressWarnings("unchecked")
  public static <T extends Throwable> RuntimeException sneakyThrow(Throwable t) throws T {
    throw (T) t;
  }
Re-throw {@code t} (even if it's a checked exception) without requiring a {@code throws}
declaration.
<p>
This function declares a return type of {@link RuntimeException} but will never actually return
a value. This allows you to use it with a {@code throw} statement to convince the compiler that
the current branch will not complete.
<pre>{@code
throw Util.sneakyThrow(new IOException());
}</pre>
<p>
Adapted from https://www.mail-archive.com/javaposse@googlegroups.com/msg05984.html