LocalSessionStore implements SessionStore { @Override public void invalidate(String sessionId, String domain) { values.remove(sessionId); }  @Override Map<String, String> getAndRefresh(String sessionId, String domain, Duration sessionTimeout); @Override void save(String sessionId, String domain, Map<String, String> values, Set<String> changedFields, Duration sessionTimeout); @Override void invalidate(String sessionId, String domain); @Override void invalidateByKey(String key, String value); void cleanup();  }
@Test void invalidate() { localSessionStore.values.put("sessionId", sessionValue(Instant.now().minus(Duration.ofSeconds(30)), Map.of())); localSessionStore.invalidate("sessionId", null); assertThat(localSessionStore.values).isEmpty(); }