### Question:
PlayerResource { @POST @ApiOperation("Registers a new player") public Response register(@Valid RegisterPlayerRequest registration) { Preconditions.checkNotNull(registration, "registration"); try { playerService.createPlayer(registration.getUsername(), registration.getPassword()); playerAuthenticationCache.invalidate(registration.getUsername(), registration.getPassword()); return Response.created(uriInfo.getAbsolutePathBuilder().path("/").build()).build(); } catch (CreatePlayerException e) { throw new CreatePlayerWebException(e, e.getReason()); } } @Inject  PlayerResource(PlayerService playerService, PlanetService planetService, PlayerAuthenticationCache playerAuthenticationCache, PointsService pointsService); @GET @ApiOperation(value = "Gets information about the current player", authorizations = { @Authorization("basicAuth") }) PlayerResponse me(@Auth @ApiParam(access = "internal") Player player); @POST @ApiOperation("Registers a new player") Response register(@Valid RegisterPlayerRequest registration); @GET @Path("/points") @ApiOperation(value = "Returns points over time for the current player", authorizations = { @Authorization("basicAuth") }) PointsResponse points(@Auth @ApiParam(access = "internal") Player player); @GET @Path("/ranking") @ApiOperation(value = "Returns the player ranking") PlayerRankingResponse playerRanking(@QueryParam("max") @DefaultValue("100") int max);  }### Answer:
@Test public void testRegister() throws Exception { request(resources, URL).post(new RegisterPlayerRequest("username", "password")); verify(playerService).createPlayer("username", "password"); }