ResourceSubscriber implements FlowableSubscriber<T>, Disposable { protected final void request(long n) { SubscriptionHelper.deferredRequest(s, missedRequested, n); }  final void add(Disposable resource); @Override final void onSubscribe(Subscription s); @Override final void dispose(); @Override final boolean isDisposed();  }
@Test public void request() { TestResourceSubscriber<Integer> tc = new TestResourceSubscriber<Integer>() { @Override protected void onStart() { start++; } }; Flowable.just(1).subscribe(tc); assertEquals(1, tc.start); assertEquals(Collections.emptyList(), tc.values); assertTrue(tc.errors.isEmpty()); assertEquals(0, tc.complete); tc.requestMore(1); assertEquals(1, tc.start); assertEquals(1, tc.values.get(0).intValue()); assertTrue(tc.errors.isEmpty()); assertEquals(1, tc.complete); }