AccessTokenResource extends AbstractResource { @GET public Response getAll(@Context HttpServletRequest request) { Response validateScopeResponse = validateScope(request, Collections.singletonList(AbstractResource.SCOPE_READ)); if (validateScopeResponse != null) { return validateScopeResponse; } List<AccessToken> tokens = getAllAccessTokens(request); return Response.ok(tokens).build(); }  @GET Response getAll(@Context HttpServletRequest request); @GET @Path("/{accessTokenId}") Response getById(@Context HttpServletRequest request, @PathParam("accessTokenId") Long id); @DELETE @Path("/{accessTokenId}") Response delete(@Context HttpServletRequest request, @PathParam("accessTokenId") Long id);  }
@Test public void getAllWhenNoneFound() { Response response = accessTokenResource.getAll(request); assertEquals(200, response.getStatus()); List tokens = (List) response.getEntity(); assertEquals(0, tokens.size()); }