@Test void createLinksResponse() throws URISyntaxException { request.setQueryString("page=1"); LinksResponse linksResponse = LinksResponse.builder() .setPrevious(new URI("http: .setSelf(new URI("http: .setNext(new URI("http: .build(); assertEquals(linksResponse, LinksUtils.createLinksResponse(1, 10, 30)); }
public static LinksResponse createLinksResponse(int number, int size, int total) { Builder builder = LinksResponse.builder().setSelf(createEntitiesResponseUri()); createPreviousUri(number, size, total).ifPresent(builder::setPrevious); createNextUri(number, size, total).ifPresent(builder::setNext); return builder.build(); }
LinksUtils { public static LinksResponse createLinksResponse(int number, int size, int total) { Builder builder = LinksResponse.builder().setSelf(createEntitiesResponseUri()); createPreviousUri(number, size, total).ifPresent(builder::setPrevious); createNextUri(number, size, total).ifPresent(builder::setNext); return builder.build(); } }
LinksUtils { public static LinksResponse createLinksResponse(int number, int size, int total) { Builder builder = LinksResponse.builder().setSelf(createEntitiesResponseUri()); createPreviousUri(number, size, total).ifPresent(builder::setPrevious); createNextUri(number, size, total).ifPresent(builder::setNext); return builder.build(); } private  LinksUtils(); }
LinksUtils { public static LinksResponse createLinksResponse(int number, int size, int total) { Builder builder = LinksResponse.builder().setSelf(createEntitiesResponseUri()); createPreviousUri(number, size, total).ifPresent(builder::setPrevious); createNextUri(number, size, total).ifPresent(builder::setNext); return builder.build(); } private  LinksUtils(); static LinksResponse createLinksResponse(int number, int size, int total); }
LinksUtils { public static LinksResponse createLinksResponse(int number, int size, int total) { Builder builder = LinksResponse.builder().setSelf(createEntitiesResponseUri()); createPreviousUri(number, size, total).ifPresent(builder::setPrevious); createNextUri(number, size, total).ifPresent(builder::setNext); return builder.build(); } private  LinksUtils(); static LinksResponse createLinksResponse(int number, int size, int total);  }