@Test
public void hasSubscribers() {

    ReplayProcessor<Integer> rp = ReplayProcessor.create();
    assertFalse(rp.hasSubscribers());
    TestSubscriber<Integer> ts = rp.test();
    assertTrue(rp.hasSubscribers());
    ts.cancel();
    assertFalse(rp.hasSubscribers());
}