public void testWithoutToken() {
    HttpResponse response =
        new HttpResponse(
            200, "ok", Payloads.newPayload(getClass().getResourceAsStream("/list_basic.xml")));
    BoundedSet<DirectoryEntry> result = createFn().apply(response);

    assertEquals(ImmutableSet.copyOf(result), values());
    assertEquals(result.getToken(), null);
  }
  public void testWithToken() {
    HttpResponse response =
        new HttpResponse(
            200,
            "ok",
            Payloads.newPayload(getClass().getResourceAsStream("/list_basic.xml")),
            ImmutableMultimap.of(AtmosHeaders.TOKEN, "token"));

    BoundedSet<DirectoryEntry> result = createFn().apply(response);
    assertEquals(result, new BoundedLinkedHashSet<DirectoryEntry>(values(), "token"));
    assertEquals(result.getToken(), "token");
  }