@Test
public void testOnStartCalledOnceViaLift() {

    final AtomicInteger c = new AtomicInteger();
    Observable.just(1, 2, 3, 4).lift(new Operator<Integer, Integer>() {
        @Override
        public Subscriber<? super Integer> call(final Subscriber<? super Integer> child) {
            return new Subscriber<Integer>() {
                @Override
                public void onStart() {
                    c.incrementAndGet();
                    request(1);
                }
                @Override
                public void onCompleted() {
                    child.onCompleted();
                }
                @Override
                public void onError(Throwable e) {
                    child.onError(e);
                }
                @Override
                public void onNext(Integer t) {
                    child.onNext(t);
                    request(1);
                }
            };
        }
    }).subscribe();
    assertEquals(1, c.get());
}