### Question:
SpawnLoader implements Reloadable { public boolean setSpawn(Location location) { return setLocation("spawn", location); } @Inject  SpawnLoader(@DataFolder File pluginFolder, Settings settings, PluginHookService pluginHookService); @Override void reload(); Location getSpawn(); boolean setSpawn(Location location); Location getFirstSpawn(); boolean setFirstSpawn(Location location); void loadEssentialsSpawn(); void unloadEssentialsSpawn(); void loadCmiSpawn(); void unloadCmiSpawn(); Location getSpawnLocation(Player player); Location getPlayerLocationOrSpawn(Player player);  }### Answer:
@Test public void shouldSetSpawn() { World world = mock(World.class); given(world.getName()).willReturn("new_world"); Location newSpawn = new Location(world, 123, 45.0, -67.89); boolean result = spawnLoader.setSpawn(newSpawn); assertThat(result, equalTo(true)); YamlConfiguration configuration = YamlConfiguration.loadConfiguration(new File(testFolder, "spawn.yml")); assertThat(configuration.getDouble("spawn.x"), equalTo(123.0)); assertThat(configuration.getDouble("spawn.y"), equalTo(45.0)); assertThat(configuration.getDouble("spawn.z"), equalTo(-67.89)); assertThat(configuration.getString("spawn.world"), equalTo("new_world")); }