@Test
public void testOnStartCalledOnceViaUnsafeSubscribe() {

    final AtomicInteger c = new AtomicInteger();
    Observable.just(1, 2, 3, 4).take(2).unsafeSubscribe(new Subscriber<Integer>() {
        @Override
        public void onStart() {
            c.incrementAndGet();
            request(1);
        }
        @Override
        public void onCompleted() {
        }
        @Override
        public void onError(Throwable e) {
        }
        @Override
        public void onNext(Integer t) {
            request(1);
        }
    });
    assertEquals(1, c.get());
}