### Question:
LimboPersistence implements SettingsDependent { public LimboPlayer getLimboPlayer(Player player) { try { return handler.getLimboPlayer(player); } catch (Exception e) { ConsoleLogger.logException("Could not get LimboPlayer for '" + player.getName() + "'", e); } return null; } @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 shouldHandleExceptionWhenGettingLimbo() { Player player = mock(Player.class); Logger logger = TestHelper.setupLogger(); LimboPersistenceHandler handler = getHandler(); doThrow(RuntimeException.class).when(handler).getLimboPlayer(player); LimboPlayer result = limboPersistence.getLimboPlayer(player); assertThat(result, nullValue()); verify(logger).warning(argThat(containsString("[RuntimeException]"))); }