UserResource { @GET @Path("/{id}/exclude") public List<String> getExcludes(@PathParam("id") Long id) { return excludeDao.getUserExcludes(id); } UserResource(UserDAO dao, MenuDAO menuDao, MealDAO mealDao, ExcludeDAO excludeDao, CommentDAO commentDao, Mailer mailer, AmazonClient s3); @GET List<User> getUsers(); @POST Response addUser(@Valid User user); @POST @Path("/update") Response updateUser(@Auth AccessToken token, @Valid User user); @GET @Path("/{id}") User getUser(@PathParam("id") Long id); @POST @Path("/byEmail") User getUserByEmail(String email); @POST @Path("/{id}/ban") Response banUser(@Auth AccessToken token, @PathParam("id") Long id); @POST @Path("/resetPassword") Response resetPassword(AnswerCredentials answer); @POST @Path("/{id}/follow") Response followUser(@Auth AccessToken token, @PathParam("id") Long id); @POST @Path("/{id}/unfollow") Response unfollowUser(@Auth AccessToken token, @PathParam("id") Long id); @GET @Path("/{id}/followers") Response getFollowers(@PathParam("id") Long id); @GET @Path("/{id}/following") Response getFollowing(@PathParam("id") Long id); @GET @Path("/{id}/menus") List<Menu> menusByUser(@PathParam("id") Long id); @GET @Path("/{id}/meals") List<Meal> mealsByUser(@PathParam("id") Long id); @GET @Path("/{id}/comments") List<Comment> commentsByUser(@PathParam("id") Long id); @POST @Path("/avatar") @Consumes(MediaType.MULTIPART_FORM_DATA) Response avatarUpload(@Auth AccessToken token, 
    		@FormDataParam("file") InputStream file, 
    		@FormDataParam("file") FormDataContentDisposition contentDispositionHeader); @GET @Path("/search/{query}") List<User> basicSearch(@PathParam("query") String query); @GET @Path("/{id}/include") List<String> getIncludes(@PathParam("id") Long id); @GET @Path("/{id}/exclude") List<String> getExcludes(@PathParam("id") Long id); @POST @Path("/{id}/include") Response updateIncludes(@Auth AccessToken token, @PathParam("id") Long id, List<String> xs); @POST @Path("/{id}/exclude") Response updateExcludes(@Auth AccessToken token, @PathParam("id") Long id, List<String> xs); @GET @Path("/{id}/checkeats") List<Meal> getEaten(@PathParam("id") Long id);  }
@Test public void testGetExcludes() throws Exception { Response res = rule.getJerseyTest() .target("/user/1/exclude") .request(MediaType.APPLICATION_JSON_TYPE) .get(); @SuppressWarnings("unchecked") ArrayList<String> read = mapper.readValue(res.readEntity(String.class), ArrayList.class); assertThat(res.getStatusInfo().getStatusCode()).isEqualTo(200); assertThat(read.size()).isEqualTo(1); assertThat(read.get(0)).isEqualTo("test"); }