@Test
public void onBeforeBlocking() {

    try {
        RxJavaPlugins.setOnBeforeBlocking(new BooleanSupplier() {
            @Override
            public boolean getAsBoolean() throws Exception {
                throw new IllegalArgumentException();
            }
        });
        try {
            RxJavaPlugins.onBeforeBlocking();
            fail("Should have thrown");
        } catch (IllegalArgumentException ex) {
            // expected
        }
    } finally {
        RxJavaPlugins.reset();
    }
}