@Test(expected = RedisCacheException.class) public void sizeThrowConnectionException() throws ConnectionException, IOException { doThrow(new ConnectionException("")).when(client).dbsize(); cache.size(); }
@Override public long size() { try { return client.dbsize(); } catch (ConnectionException|IOException e) { throw new RedisCacheException(e); } }
RedisCache extends AbstractCache<K, V> { @Override public long size() { try { return client.dbsize(); } catch (ConnectionException|IOException e) { throw new RedisCacheException(e); } } }
RedisCache extends AbstractCache<K, V> { @Override public long size() { try { return client.dbsize(); } catch (ConnectionException|IOException e) { throw new RedisCacheException(e); } } RedisCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      Serializer<Object> serializer, Client client); }
RedisCache extends AbstractCache<K, V> { @Override public long size() { try { return client.dbsize(); } catch (ConnectionException|IOException e) { throw new RedisCacheException(e); } } RedisCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      Serializer<Object> serializer, Client client); @Override void put(final K key, final V value); @Override void put(final K key, final V value, final TimeUnit timeUnit, final long duration); @Override @SuppressWarnings("unchecked") V get(final K key); @Override @SuppressWarnings("unchecked") V invalidate(final K key); @Override boolean contains(final K key); @Override void clear(); @Override long size(); @Override CacheStats stats(); }
RedisCache extends AbstractCache<K, V> { @Override public long size() { try { return client.dbsize(); } catch (ConnectionException|IOException e) { throw new RedisCacheException(e); } } RedisCache(final String name, final CacheLoader<K, V> cacheLoader,
      final EvictionListener<K, V> evictionListener,
      Serializer<Object> serializer, Client client); @Override void put(final K key, final V value); @Override void put(final K key, final V value, final TimeUnit timeUnit, final long duration); @Override @SuppressWarnings("unchecked") V get(final K key); @Override @SuppressWarnings("unchecked") V invalidate(final K key); @Override boolean contains(final K key); @Override void clear(); @Override long size(); @Override CacheStats stats();  }