@Test
public void testNoSubscriberRetentionOnCompleted() {

    ObservablePublish<Integer> source = (ObservablePublish<Integer>)Observable.just(1).publish();
    TestObserver<Integer> to1 = new TestObserver<Integer>();
    source.subscribe(to1);
    to1.assertNoValues();
    to1.assertNoErrors();
    to1.assertNotComplete();
    source.connect();
    to1.assertValue(1);
    to1.assertNoErrors();
    to1.assertTerminated();
    assertNull(source.current.get());
}