### Question:
StudentRestService { @Path("/v5") @JSONP(callback="jsonp",queryParam="callback") @Produces({MediaType.APPLICATION_XML,"application/javascript"}) @GET public Students getStudentsV5(@QueryParam("pageNumber")int pageNumber,@DefaultValue("20")@QueryParam("pageSize")int pageSize) { Students students = new Students(); List<Student> lists = new ArrayList<Student>(); ClassRoom classRoom = new ClassRoom(); classRoom.setCid(1); classRoom.setClassname("三年二班"); for (int i = 1; i <= 100; i++) { Student student = new Student(i,"SCOTT"); student.setClassRoom(classRoom); lists.add(student); } int totalPages = lists.size() % pageSize==0 ? lists.size() / pageSize :lists.size() / pageSize +1 ; if(pageNumber <= 0 ){ pageNumber = 1; }else if(pageNumber >= totalPages){ pageNumber = totalPages; } int start = (pageNumber-1)*pageSize; int end = start + pageSize; for (int i = start; i < end; i++) { students.getStudents().add(lists.get(i)); } return students; }  @Path("/v1") @GET Response getStudentsV1(); @Path("/v2") @GET List<Student> getStudentsV2(); @Path("/v3") @GET Students getStudentsV3(); @Path("/v4") @GET Students getStudentsV4(@QueryParam("pageNumber")int pageNumber,@DefaultValue("20")@QueryParam("pageSize")int pageSize); @Path("/v5") @JSONP(callback="jsonp",queryParam="callback") @Produces({MediaType.APPLICATION_XML,"application/javascript"}) @GET Students getStudentsV5(@QueryParam("pageNumber")int pageNumber,@DefaultValue("20")@QueryParam("pageSize")int pageSize); @GET @Path("/xml/{id}") @Produces(MediaType.APPLICATION_XML) Response getStudentInXml(@PathParam("id") int id); @GET @Path("/{id}") Response getStudentInfo(@PathParam("id") int id); @DELETE @Path("/{id}") Response removeStudent(@PathParam("id") int id); @POST Response saveStudent(Student student); @PUT Response updateStudent(Student student);  }### Answer:
@Test public void testGetStudentsV5(){ Response response = target("/student").path("v5").queryParam("pageNumber", "1").request().accept(MediaType.APPLICATION_XML).get(); System.out.println(response.getStatus()); System.out.println(response.readEntity(String.class)); }