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