@Test
public void correctRequests() {

  CharBuffer buffer = CharBuffer.wrap(SAMPLE_JSON_ARRAY.toCharArray());
  Subscription subscription = mock(Subscription.class);
  doAnswer(new TokenAnswer(SAMPLE_TOKENS)).when(subscription).request(1L);
  processor.onSubscribe(subscription);
  
  Subscriber<String> subscriber = mock(Subscriber.class);
  RequestOneAnswer answer = new RequestOneAnswer(); 
  doAnswer(answer).when(subscriber).onSubscribe(any());
  doAnswer(answer).when(subscriber).onNext(any());
  processor.subscribe(subscriber);
  verify(subscription, times(SAMPLE_TOKENS.length)).request(anyLong());
  ArgumentCaptor<String> values = ArgumentCaptor.forClass(String.class);
  verify(subscriber, times(13)).onNext(values.capture());
  assertThat(values.getAllValues()).containsExactly(
      SAMPLE_TRIMMED_JSON_OBJECT,
      "{}",
      "[1,2,3]",
      "[]",
      "\"Json String\"",
      "0",
      "42",
      "-11",
      "3.141",
      "3e141",
      "true",
      "false",
      "null");
}