### Question:
CerberusPlugin extends Plugin { @Subscribe public void onGameTick(GameTick gameTick) { if (ghosts.isEmpty()) { return; } ghosts.sort((a, b) -> ComparisonChain.start() .compare(a.getLocalLocation().getY(), b.getLocalLocation().getY()) .compare(a.getLocalLocation().getX(), b.getLocalLocation().getX()) .result()); }  @Subscribe void onGameStateChanged(GameStateChanged event); @Subscribe void onNpcSpawned(final NpcSpawned event); @Subscribe void onNpcDespawned(final NpcDespawned event); @Subscribe void onGameTick(GameTick gameTick);  }### Answer:
@Test public void testOnGameTick() { List<NPC> ghosts = cerberusPlugin.getGhosts(); ghosts.addAll(Arrays.asList( mockNpc(new LocalPoint(0, 0)), mockNpc(new LocalPoint(1, 0)), mockNpc(new LocalPoint(0, 5)), mockNpc(new LocalPoint(2, 0)), mockNpc(new LocalPoint(2, 5)), mockNpc(new LocalPoint(1, 5)) )); cerberusPlugin.onGameTick(new GameTick()); assertEquals(ghosts.get(0).getLocalLocation(), new LocalPoint(0, 0)); assertEquals(ghosts.get(1).getLocalLocation(), new LocalPoint(1, 0)); assertEquals(ghosts.get(2).getLocalLocation(), new LocalPoint(2, 0)); assertEquals(ghosts.get(3).getLocalLocation(), new LocalPoint(0, 5)); assertEquals(ghosts.get(4).getLocalLocation(), new LocalPoint(1, 5)); assertEquals(ghosts.get(5).getLocalLocation(), new LocalPoint(2, 5)); }