@Test void save() { Map<String, Serializable> contextStore = new HashMap<>(); this.component.save(contextStore, "key", "value", Arrays.asList()); assertFalse(contextStore.containsKey("key")); this.component.save(contextStore, "key", null, Arrays.asList("key")); assertTrue(contextStore.containsKey("key")); assertNull(contextStore.get("key")); }
protected void save(Map<String, Serializable> contextStore, String key, Serializable value, Collection<String> entries) { if (entries.contains(key)) { contextStore.put(key, value); } }
AbstractContextStore implements ContextStore { protected void save(Map<String, Serializable> contextStore, String key, Serializable value, Collection<String> entries) { if (entries.contains(key)) { contextStore.put(key, value); } } }
AbstractContextStore implements ContextStore { protected void save(Map<String, Serializable> contextStore, String key, Serializable value, Collection<String> entries) { if (entries.contains(key)) { contextStore.put(key, value); } } AbstractContextStore(String... entries); }
AbstractContextStore implements ContextStore { protected void save(Map<String, Serializable> contextStore, String key, Serializable value, Collection<String> entries) { if (entries.contains(key)) { contextStore.put(key, value); } } AbstractContextStore(String... entries); @Override Collection<String> getSupportedEntries(); }
AbstractContextStore implements ContextStore { protected void save(Map<String, Serializable> contextStore, String key, Serializable value, Collection<String> entries) { if (entries.contains(key)) { contextStore.put(key, value); } } AbstractContextStore(String... entries); @Override Collection<String> getSupportedEntries();  }