### Question:
IndividualFilesPersistenceHandler implements LimboPersistenceHandler { @Override public void saveLimboPlayer(Player player, LimboPlayer limboPlayer) { String id = PlayerUtils.getUuidOrName(player); try { File file = new File(cacheDir, id + File.separator + "data.json"); Files.createParentDirs(file); Files.touch(file); Files.write(gson.toJson(limboPlayer), file, StandardCharsets.UTF_8); } catch (IOException e) { ConsoleLogger.logException("Failed to write " + player.getName() + " data:", e); } } @Inject  IndividualFilesPersistenceHandler(@DataFolder File dataFolder, BukkitService bukkitService); @Override LimboPlayer getLimboPlayer(Player player); @Override void saveLimboPlayer(Player player, LimboPlayer limboPlayer); @Override void removeLimboPlayer(Player player); @Override LimboPersistenceType getType();  }### Answer:
@Test public void shouldSavePlayerData() { Player player = mock(Player.class); UUID uuid = UUID.nameUUIDFromBytes("New player".getBytes()); given(player.getUniqueId()).willReturn(uuid); World world = mock(World.class); given(world.getName()).willReturn("player-world"); Location location = new Location(world, 0.2, 102.25, -89.28, 3.02f, 90.13f); LimboPlayer limbo = new LimboPlayer(location, true, Collections.singletonList("primary-grp"), true, 1.2f, 0.8f); handler.saveLimboPlayer(player, limbo); File playerFile = new File(dataFolder, FileUtils.makePath("playerdata", uuid.toString(), "data.json")); assertThat(playerFile.exists(), equalTo(true)); }