@Test
public void onSubscribe() throws Exception {

    List<Throwable> errors = TestHelper.trackPluginErrors();
    try {
        BooleanSubscription s = new BooleanSubscription();
        fs.onSubscribe(s);
        BooleanSubscription s2 = new BooleanSubscription();
        fs.onSubscribe(s2);
        assertFalse(s.isCancelled());
        assertTrue(s2.isCancelled());
        TestHelper.assertError(errors, 0, IllegalStateException.class, "Subscription already set!");
    } finally {
        RxJavaPlugins.reset();
    }
}