@Test void saveSubContext() { SubContextStore subStore = mock(SubContextStore.class); this.component.save(subStore, "prefix", Arrays.asList()); verifyNoMoreInteractions(subStore); this.component.save(subStore, "prefix", Arrays.asList("prefix")); verify(subStore).save("prefix", ""); this.component.save(subStore, "prefix.", Arrays.asList("prefix.subkey")); verify(subStore).save("prefix.subkey", "subkey"); }
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();  }