@Test public void testGet() { doReturn(Optional.of(value)).when(inMemoryQuery).apply(streamWithOnly(entry1Data)); Object result = backend.select(group1Name, backendQuery); assertThat(result).isSameAs(value); verifyZeroInteractions(entry2Data); }
@Override public <V> V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query) { return getValue(query, getGroupData(group)); }
InMemoryBackend implements BusinessParametersBackend<InMemoryQuery<?>> { @Override public <V> V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query) { return getValue(query, getGroupData(group)); } }
InMemoryBackend implements BusinessParametersBackend<InMemoryQuery<?>> { @Override public <V> V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query) { return getValue(query, getGroupData(group)); } InMemoryBackend(InMemoryBackendGroupFactoryContext factoryContext, Supplier<Stream<ParameterGroupDefinition<?>>> definitions, GroupDataStore dataStore); }
InMemoryBackend implements BusinessParametersBackend<InMemoryQuery<?>> { @Override public <V> V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query) { return getValue(query, getGroupData(group)); } InMemoryBackend(InMemoryBackendGroupFactoryContext factoryContext, Supplier<Stream<ParameterGroupDefinition<?>>> definitions, GroupDataStore dataStore); @Override BackendQuery<? extends InMemoryQuery<?>, ?> internalizeQuery(String groupName, Object queryObject, BackendWireFormatterContext context); @Override V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query); @Override void update(String group, BackendQuery<? extends InMemoryQuery<?>, V> query, V value); @Override EntryData getEntry(String group, String id); @Override void update(String group, String id, Map<String, String> entry); void insert(String group, Map<String, String> entry); R exportEntries(String groupName, Collector<? super BackendEntry, ?, R> collector); @Override Collection<String> getGroupNames(); @Override ParameterGroupDefinition<?> getDefinition(String groupName); }
InMemoryBackend implements BusinessParametersBackend<InMemoryQuery<?>> { @Override public <V> V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query) { return getValue(query, getGroupData(group)); } InMemoryBackend(InMemoryBackendGroupFactoryContext factoryContext, Supplier<Stream<ParameterGroupDefinition<?>>> definitions, GroupDataStore dataStore); @Override BackendQuery<? extends InMemoryQuery<?>, ?> internalizeQuery(String groupName, Object queryObject, BackendWireFormatterContext context); @Override V select(String group, BackendQuery<? extends InMemoryQuery<?>, V> query); @Override void update(String group, BackendQuery<? extends InMemoryQuery<?>, V> query, V value); @Override EntryData getEntry(String group, String id); @Override void update(String group, String id, Map<String, String> entry); void insert(String group, Map<String, String> entry); R exportEntries(String groupName, Collector<? super BackendEntry, ?, R> collector); @Override Collection<String> getGroupNames(); @Override ParameterGroupDefinition<?> getDefinition(String groupName);  }