### Question:
LimboPersistence implements SettingsDependent { public void saveLimboPlayer(Player player, LimboPlayer limbo) { try { handler.saveLimboPlayer(player, limbo); } catch (Exception e) { ConsoleLogger.logException("Could not save LimboPlayer for '" + player.getName() + "'", e); } } @Inject  LimboPersistence(Settings settings, Factory<LimboPersistenceHandler> handlerFactory); LimboPlayer getLimboPlayer(Player player); void saveLimboPlayer(Player player, LimboPlayer limbo); void removeLimboPlayer(Player player); @Override void reload(Settings settings);  }### Answer:
@Test public void shouldHandleExceptionWhenSavingLimbo() { Player player = mock(Player.class); LimboPlayer limbo = mock(LimboPlayer.class); Logger logger = TestHelper.setupLogger(); LimboPersistenceHandler handler = getHandler(); doThrow(IllegalStateException.class).when(handler).saveLimboPlayer(player, limbo); limboPersistence.saveLimboPlayer(player, limbo); verify(logger).warning(argThat(containsString("[IllegalStateException]"))); }