SpaceRest extends BaseRest { @Path("/acl/{spaceID}") @POST public Response updateSpaceACLs(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID) { String msg = "update space ACLs(" + spaceID + ", " + storeID + ")"; try { log.debug(msg); return doUpdateSpaceACLs(spaceID, storeID); } catch (ResourceNotFoundException e) { return responseNotFound(msg, e, NOT_FOUND); } catch (ResourceException e) { return responseBad(msg, e, INTERNAL_SERVER_ERROR); } catch (Exception e) { return responseBad(msg, e, INTERNAL_SERVER_ERROR); } } @Autowired  SpaceRest(SpaceResource spaceResource,
                     SecurityContextUtil securityContextUtil); @Path("/spaces") @GET @Produces(XML) Response getSpaces(@QueryParam("storeID") String storeID); @Path("/{spaceID}") @GET @Produces(XML) Response getSpace(@PathParam("spaceID") String spaceID,
                             @QueryParam("storeID") String storeID,
                             @QueryParam("prefix") String prefix,
                             @QueryParam("maxResults") long maxResults,
                             @QueryParam("marker") String marker); @Path("/{spaceID}") @HEAD Response getSpaceProperties(@PathParam("spaceID") String spaceID,
                                       @QueryParam("storeID") String storeID); @Path("/acl/{spaceID}") @HEAD Response getSpaceACLs(@PathParam("spaceID") String spaceID,
                                 @QueryParam("storeID") String storeID); @Path("/{spaceID}") @PUT Response addSpace(@PathParam("spaceID") String spaceID,
                             @QueryParam("storeID") String storeID); @Path("/acl/{spaceID}") @POST Response updateSpaceACLs(@PathParam("spaceID") String spaceID,
                                    @QueryParam("storeID") String storeID); @Path("/{spaceID}") @DELETE Response deleteSpace(@PathParam("spaceID") String spaceID,
                                @QueryParam("storeID") String storeID);  }
@Test public void testUpdateSpaceACLs() throws Exception { createUpdateSpaceACLsMocks(); Response response = spaceRest.updateSpaceACLs(spaceId, storeId); Assert.assertNotNull(response); Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getStatus()); }