ListResponseBuilder { public ListResponseBuilder sort(final String sort) { responseEntity.setSort(sort); builder.header(ApiParam.SORT_HEADER, sort); return this; } private  ListResponseBuilder(); static ListResponseBuilder builder(); ListResponseBuilder addResult(final List<T> results); ListResponseBuilder limit(final Number limit); ListResponseBuilder total(final Number total); ListResponseBuilder total(final Object total); ListResponseBuilder offset(final Number offset); ListResponseBuilder sort(final String sort); ListResponseBuilder order(final SortOrder order); ListResponseBuilder order(final String order); Response build();  }
@Test public void testSort() throws Exception { ListResponseBuilder b = ListResponseBuilder.builder(); b.sort("foo"); Response response = b.build(); assertEquals("foo", response.getHeaderString(ApiParam.SORT_HEADER)); }