@Test public void scalar(){ when(clientMock.getScalarKeyValue(any(), any(), any(), any(), any(), any())).thenReturn(Optional.of(6L)); Optional<Long> result = unitUnderTest.getScalarKeyValue("key1"); assertTrue(result.isPresent()); assertThat(result.get(), is(equalTo(6L))); }
@Override public Optional<V> getScalarKeyValue( K key) { return genericClient.getScalarKeyValue(store, keyClass, key, valueClass, keySerde, valueSerde); }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Optional<V> getScalarKeyValue( K key) { return genericClient.getScalarKeyValue(store, keyClass, key, valueClass, keySerde, valueSerde); } }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Optional<V> getScalarKeyValue( K key) { return genericClient.getScalarKeyValue(store, keyClass, key, valueClass, keySerde, valueSerde); } SpecificBlockingRestKiqrClientImpl(String host, int port, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde);  SpecificBlockingRestKiqrClientImpl(GenericBlockingKiqrClient genericClient, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde); }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Optional<V> getScalarKeyValue( K key) { return genericClient.getScalarKeyValue(store, keyClass, key, valueClass, keySerde, valueSerde); } SpecificBlockingRestKiqrClientImpl(String host, int port, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde);  SpecificBlockingRestKiqrClientImpl(GenericBlockingKiqrClient genericClient, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde); @Override Optional<V> getScalarKeyValue( K key); @Override Map<K, V> getAllKeyValues(); @Override Map<K, V> getRangeKeyValues( K from, K to); @Override Map<Long, V> getWindow( K key, long from, long to); @Override Optional<Long> count(String store); @Override Map<Window, V> getSession(K key); }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Optional<V> getScalarKeyValue( K key) { return genericClient.getScalarKeyValue(store, keyClass, key, valueClass, keySerde, valueSerde); } SpecificBlockingRestKiqrClientImpl(String host, int port, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde);  SpecificBlockingRestKiqrClientImpl(GenericBlockingKiqrClient genericClient, String store, Class<K> keyClass, Class<V> valueClass, Serde<K> keySerde, Serde<V> valueSerde); @Override Optional<V> getScalarKeyValue( K key); @Override Map<K, V> getAllKeyValues(); @Override Map<K, V> getRangeKeyValues( K from, K to); @Override Map<Long, V> getWindow( K key, long from, long to); @Override Optional<Long> count(String store); @Override Map<Window, V> getSession(K key);  }