LinkHeaderResponseFilter implements ContainerResponseFilter { protected String buildPageLink(UriBuilder b, int value) { UriBuilder builder = b.clone(); builder.queryParam(PageRequest.PAGE_PARAM, String.valueOf(value)); String link = builder.build().toString(); if (link.length() > MAX_LINK_LENGTH) { throw new LinkTooLongException(link); } return link; } @Inject  LinkHeaderResponseFilter(Configuration config,
        @Named("PREFIX_APIURL_KEY") String apiUrlPrefixKey); @SuppressWarnings("rawtypes") void filter(ContainerRequestContext reqContext, ContainerResponseContext respContext); static final int MAX_LINK_LENGTH; static final String LINK_HEADER; static final String TOTAL_RECORDS_COUNT; static final String LINK_TYPE; }
@Test public void testBuildPageLink() { UriBuilder bu = UriBuilder.fromUri("https: assertEquals("https: interceptor.buildPageLink(bu, 5)); }