### Question:
RankingService { public static int ratingChange(int place) { if (place < 1 || place > 4) return 0; return RATING_CHANGES[place - 1]; }  @PostConstruct void initPlayers(); @GET @Produces(MediaType.APPLICATION_JSON) Collection<Player> topNPlayers(@QueryParam("limit") @DefaultValue("5") Integer numPlayers); @POST @RolesAllowed({ "admin" }) @Path("/{playerId}") void recordGame(@PathParam("playerId") String id, @QueryParam("place") int place, @HeaderParam("Authorization") String token); static int ratingChange(int place); static final int RATING_INITIAL; }### Answer:
@Test public void ratingChangeTest() { assertEquals(0, ratingChange(-1)); assertEquals(0, ratingChange(0)); assertEquals(28, ratingChange(1)); assertEquals(14, ratingChange(2)); assertEquals(-5, ratingChange(3)); assertEquals(-12, ratingChange(4)); assertEquals(0, ratingChange(5)); }