### Question:
SessionService implements Reloadable { public boolean canResumeSession(Player player) { final String name = player.getName(); if (isEnabled && database.hasSession(name)) { database.setUnlogged(name); database.revokeSession(name); PlayerAuth auth = database.getAuth(name); SessionState state = fetchSessionStatus(auth, player); if (state.equals(SessionState.VALID)) { RestoreSessionEvent event = bukkitService.createAndCallEvent( isAsync -> new RestoreSessionEvent(player, isAsync)); return !event.isCancelled(); } else if (state.equals(SessionState.IP_CHANGED)) { service.send(player, MessageKey.SESSION_EXPIRED); } } return false; } @Inject  SessionService(CommonService service, BukkitService bukkitService, DataSource database); boolean canResumeSession(Player player); void grantSession(String name); void revokeSession(String name); @Override void reload();  }### Answer:
@Test public void shouldCheckIfUserHasSession() { String name = "Bobby"; Player player = mock(Player.class); given(player.getName()).willReturn(name); given(dataSource.hasSession(name)).willReturn(false); boolean result = sessionService.canResumeSession(player); assertThat(result, equalTo(false)); verify(commonService, only()).getProperty(PluginSettings.SESSIONS_ENABLED); verify(dataSource, only()).hasSession(name); }