ResourceOwnerResource extends AbstractResource { @GET public Response getAll(@Context HttpServletRequest request) { Response validateScopeResponse = validateScope(request, Collections.singletonList(AbstractResource.SCOPE_READ)); if (validateScopeResponse != null) { return validateScopeResponse; } List<ResourceOwner> resourceOwners = getAllResourceOwners(request); return Response.ok(resourceOwners).build(); }  @GET Response getAll(@Context
                         HttpServletRequest request); @GET @Path("/{resourceOwnerId}") Response getById(@Context
                          HttpServletRequest request, @PathParam("resourceOwnerId")
                          Long id); @PUT Response put(@Context
                      HttpServletRequest request, @Valid
                      ResourceOwner newOne); @DELETE @Path("/{resourceOwnerId}") Response delete(@Context
                         HttpServletRequest request, @PathParam("resourceOwnerId")
                         Long id); @POST @Path("/{resourceOwnerId}") Response post(@Valid
                       final ResourceOwner resourceOwner, @Context
                       HttpServletRequest request, @PathParam("resourceServerId")
                       Long id);  }
@Test public void getAllWhenNoneFound() { Response response = resourceOwnerResource.getAll(request); assertEquals(200, response.getStatus()); List<ResourceOwner> owners = (List<ResourceOwner>) response.getEntity(); assertEquals(0, owners.size()); }