StudentServiceRs { @GET @Path("/byStudentId/{studentId}") @Produces({ "application/json" }) public Response getStudentsByStudentId( @NotNull @Digits(integer = 7, fraction = 0) @PathParam("studentId") String studentId) { Student s = null; try { s = service.getStudentByKey(studentId); } catch (NoResultException e) { return Response.status(Response.Status.NOT_FOUND).build(); } return Response.ok().entity(s).build(); }  @GET @Path("/nbStudents") @Produces({ "application/json" }) String getNbStudent(); @GET @Path("/all") @Produces({ "application/json" }) Response getAll(); @GET @Path("/byStudentId/{studentId}") @Produces({ "application/json" }) Response getStudentsByStudentId(
			@NotNull @Digits(integer = 7, fraction = 0) @PathParam("studentId") String studentId); @PUT @Path("/add") @Produces({ "application/json" }) Response add(@NotNull Student student); @POST @Path("/update/{studentId}") @Produces({ "application/json" }) Response update(@NotNull @Digits(integer = 7, fraction = 0) @PathParam("studentId") String studentId,
			@NotNull Student student);  }
@Test public void shouldGetUnkownIdReturn404() { Response result = sut.getStudentsByStudentId("972"); Assert.assertEquals(404, result.getStatus()); }