@Override
  public ExportResult<ContactsModelWrapper> export(
      UUID jobId, TokensAndUrlAuthData authData, Optional<ExportInformation> exportInformation) {
    if (exportInformation.isPresent()) {
      StringPaginationToken stringPaginationToken = (StringPaginationToken)
          exportInformation.get().getPaginationData();
      return exportContacts(authData, Optional.ofNullable(stringPaginationToken));
    } else {
      return exportContacts(authData, Optional.empty());
    }
  }
@Test
  public void exportSubsequentPage() throws IOException {
    setUpSinglePersonResponse();

    // Looking at a subsequent page, with no pages after it
    PaginationData paginationData = new StringPaginationToken(NEXT_PAGE_TOKEN);
    ExportInformation exportInformation = new ExportInformation(paginationData, null);
    listConnectionsResponse.setNextPageToken(null);

    when(listConnectionsRequest.setPageToken(NEXT_PAGE_TOKEN)).thenReturn(listConnectionsRequest);

    // Run test
    ExportResult<ContactsModelWrapper> result =
        contactsService.export(UUID.randomUUID(), null, Optional.of(exportInformation));

    // Verify correct calls were made - i.e., token was added before execution
    InOrder inOrder = Mockito.inOrder(listConnectionsRequest);
    inOrder.verify(listConnectionsRequest).setPageToken(NEXT_PAGE_TOKEN);
    inOrder.verify(listConnectionsRequest).execute();

    // Check continuation data
    ContinuationData continuationData = (ContinuationData) result.getContinuationData();
    assertThat(continuationData.getContainerResources()).isEmpty();
    assertThat(continuationData.getPaginationData()).isNull();
  }