LocalSessionStore implements SessionStore { @Override public void save(String sessionId, String domain, Map<String, String> values, Set<String> changedFields, Duration sessionTimeout) { Map<String, String> updatedValues = Maps.newHashMapWithExpectedSize(values.size()); values.forEach((field, value) -> { if (value != null) updatedValues.put(field, value); }); this.values.put(sessionId, new SessionValue(expirationTime(sessionTimeout), updatedValues)); }  @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 save() { localSessionStore.save("sessionId", null, Map.of("key", "value"), Set.of(), Duration.ofSeconds(30)); assertThat(localSessionStore.values).hasSize(1); }