### Question:
UserGroupResource { @POST @RolesAllowed("/roleManagement/create") public Response createGroup(@Auth UserInfo userInfo, @Valid GroupDTO dto) { log.debug("Creating new group {}", dto.getName()); userGroupService.createGroup(dto.getName(), dto.getRoleIds(), dto.getUsers()); return Response.ok().build(); } @Inject  UserGroupResource(UserGroupService userGroupService); @POST @RolesAllowed("/roleManagement/create") Response createGroup(@Auth UserInfo userInfo, @Valid GroupDTO dto); @PUT @RolesAllowed("/roleManagement") Response updateGroup(@Auth UserInfo userInfo, @Valid GroupDTO dto); @GET @RolesAllowed("/roleManagement") Response getGroups(@Auth UserInfo userInfo); @DELETE @Path("{id}") @RolesAllowed("/roleManagement/delete") Response deleteGroup(@Auth UserInfo userInfo, @PathParam("id") String group);  }### Answer:
@Test public void createGroup() { final Response response = resources.getJerseyTest() .target("/group") .request() .header("Authorization", "Bearer " + TOKEN) .post(Entity.json(getCreateGroupDto(GROUP, Collections.singleton(ROLE_ID)))); assertEquals(HttpStatus.SC_OK, response.getStatus()); verify(userGroupService).createGroup(GROUP, Collections.singleton(ROLE_ID), Collections.singleton(USER)); verifyNoMoreInteractions(userGroupService); }