@Test public void range(){ Map<String, Long> results = new HashMap<>(); results.put("key1", 6L); when(clientMock.getRangeKeyValues(any(), eq(String.class), eq(Long.class), any(), any(), any(), any())).thenReturn(results); Map<String, Long> result = unitUnderTest.getRangeKeyValues("key1", "key2"); assertThat(result.size(), is(equalTo(1))); assertThat(result, hasEntry("key1", 6L)); }
@Override public Map<K, V> getRangeKeyValues( K from, K to) { return genericClient.getRangeKeyValues(store, keyClass, valueClass, keySerde, valueSerde, from, to); }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Map<K, V> getRangeKeyValues( K from, K to) { return genericClient.getRangeKeyValues(store, keyClass, valueClass, keySerde, valueSerde, from, to); } }
SpecificBlockingRestKiqrClientImpl implements SpecificBlockingKiqrClient<K,V> { @Override public Map<K, V> getRangeKeyValues( K from, K to) { return genericClient.getRangeKeyValues(store, keyClass, valueClass, keySerde, valueSerde, from, to); } 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 Map<K, V> getRangeKeyValues( K from, K to) { return genericClient.getRangeKeyValues(store, keyClass, valueClass, keySerde, valueSerde, from, to); } 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 Map<K, V> getRangeKeyValues( K from, K to) { return genericClient.getRangeKeyValues(store, keyClass, valueClass, keySerde, valueSerde, from, to); } 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);  }