@Test
  public void listCollectionsSecondPage() throws Exception {
    String pidString = "uuid:23425234532434";
    String url = "https://localhost/services/collection/" + pidString + "/1";
    IRI iri = new IRI(url);

    Map<?, ?> response = this.generateImmediateChildrenResponse(10);

    when(tripleStoreQueryService.sendSPARQL(endsWith(" 0"))).thenReturn(null);
    when(tripleStoreQueryService.sendSPARQL(endsWith(" 10"))).thenReturn(response);

    Feed feed = manager.listCollectionContents(iri, new AuthCredentials("", "", ""), config);
    assertEquals(feed.getEntries().size(), 10);
    assertEquals(feed.getLinks().size(), 1);
    String nextLink = feed.getLink("next").getHref().toString();
    nextLink = nextLink.substring(nextLink.lastIndexOf("/") + 1);
    assertTrue("2".equals(nextLink));
    assertTrue(pidString.equals(feed.getId().toString()));
  }
  @PayloadRoot(
      localPart = Constants.GET_ALL_COLLECTION_PATHS_REQUEST,
      namespace = Constants.NAMESPACE)
  public GetAllCollectionPathsResponse getSearchResult(
      GetAllCollectionPathsRequest getPathsRequest) {

    List<String> temp = tripleStoreQueryService.fetchAllCollectionPaths();

    GetAllCollectionPathsResponse response = new GetAllCollectionPathsResponse();

    response.getPaths().addAll(temp);

    return response;
  }
  @Test
  public void listCollections() throws Exception {
    String pidString = "uuid:23425234532434";
    String url = "https://localhost/services/collection/" + pidString;
    IRI iri = new IRI(url);

    Map<?, ?> response = this.generateImmediateChildrenResponse(10);

    when(tripleStoreQueryService.sendSPARQL(anyString())).thenReturn(response);

    Feed feed = manager.listCollectionContents(iri, new AuthCredentials("", "", ""), config);
    assertEquals(feed.getEntries().size(), 10);
    assertEquals(feed.getLinks().size(), 1);
    assertTrue(pidString.equals(feed.getId().toString()));
  }