@Override
  public void subscribe(final Subscriber<? super Row> subscriber) {
    if (polling) {
      throw new IllegalStateException("Cannot set subscriber if polling");
    }
    synchronized (this) {
      subscribing = true;
      super.subscribe(subscriber);
    }
  }
@Test
  public void shouldAllowSubscribeIfComplete() throws Exception {
    // Given
    givenPublisherAcceptsOneRow();
    completeQueryResult();

    // When
    subscribe();
    subscription.request(1);

    // Then
    assertThatEventually(() -> subscriberReceivedRow, is(true));
    assertThatEventually(() -> subscriberCompleted, is(true));
  }