@Test(expected = IllegalStateException.class)
public void testNoSubscriptions() throws Exception {
TestScheduler testScheduler = Schedulers.test();
UnicastContentSubject<String> subject = UnicastContentSubject.create(1, TimeUnit.DAYS, testScheduler);
subject.onNext("Start the timeout now."); // Since the timeout is scheduled only after content arrival.
testScheduler.advanceTimeBy(1, TimeUnit.DAYS);
subject.toBlocking().last(); // Should immediately throw an error.
}
@Test(expected = IllegalStateException.class)
public void testNoSubscriptionsWithOnUnsubscribeAction() throws Exception {