LootTrackerController { @RequestMapping(method = RequestMethod.POST) public void storeLootRecord(HttpServletRequest request, HttpServletResponse response, @RequestBody Collection<LootRecord> records) throws IOException { SessionEntry session = null; if (request.getHeader(RuneLiteAPI.RUNELITE_AUTH) != null) { session = auth.handle(request, response); if (session == null) { return; } } Integer userId = session == null ? null : session.getUser(); if (userId != null) { service.store(records, userId); } response.setStatus(HttpStatusCodes.STATUS_CODE_OK); try (Jedis jedis = redisPool.getResource()) { jedis.publish("drops", GSON.toJson(records)); } }  @RequestMapping(method = RequestMethod.POST) void storeLootRecord(HttpServletRequest request, HttpServletResponse response, @RequestBody Collection<LootRecord> records); @GetMapping Collection<LootAggregate> getLootAggregate(HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "count", defaultValue = "1024") int count, @RequestParam(value = "start", defaultValue = "0") int start); @DeleteMapping void deleteLoot(HttpServletRequest request, HttpServletResponse response,
		@RequestParam(required = false) String eventId);  }
@Test public void storeLootRecord() throws Exception { LootRecord lootRecord = new LootRecord(); lootRecord.setType(LootRecordType.NPC); lootRecord.setTime(Instant.now()); lootRecord.setDrops(Collections.singletonList(new GameItem(4151, 1))); String data = RuneLiteAPI.GSON.toJson(Collections.singletonList(lootRecord)); mockMvc.perform(post("/loottracker") .header(RuneLiteAPI.RUNELITE_AUTH, UUID.nameUUIDFromBytes("test".getBytes())) .content(data) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()); verify(lootTrackerService).store(eq(Collections.singletonList(lootRecord)), anyInt()); }