### Question:
UserRoleResource { @POST public Response createRole(@Auth UserInfo userInfo, UserRoleDto dto) { log.info("Creating new role {} on behalf of admin {}...", dto, userInfo.getName()); userRoleService.createRole(dto); return Response.ok().build(); } @Inject  UserRoleResource(UserRoleService roleService); @GET Response getRoles(@Auth UserInfo userInfo); @POST Response createRole(@Auth UserInfo userInfo, UserRoleDto dto);  }### Answer:
@Test public void createRole() { final Response response = resources.getJerseyTest() .target("/role") .request() .header("Authorization", "Bearer " + TOKEN) .post(Entity.json(getUserRole())); assertEquals(HttpStatus.SC_OK, response.getStatus()); verify(rolesService).createRole(refEq(getUserRole())); verifyNoMoreInteractions(rolesService); }