@Test
public void testJust() {

    AbstractOnSubscribe<Integer, Void> aos = new AbstractOnSubscribe<Integer, Void>() {
        @Override
        protected void next(SubscriptionState<Integer, Void> state) {
            state.onNext(1);
            state.onCompleted();
        }
    };
    
    TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
    
    aos.toObservable().subscribe(ts);
    
    ts.assertNoErrors();
    ts.assertTerminalEvent();
    ts.assertReceivedOnNext(Arrays.asList(1));
}