CacheImpl implements Cache { @Override public Collection<SocketAddress> getAvailableServers() { return cacheClient.getAvailableServers(); } CacheImpl(final String name, final Collection<String> aliases, final CacheClient cacheClient,
            final SerializationType defaultSerializationType, final JsonTranscoder jsonTranscoder, final JavaTranscoder javaTranscoder,
            final CacheTranscoder customTranscoder, final CacheProperties properties); @Override Collection<SocketAddress> getAvailableServers(); @Override T get(final String cacheKey, final SerializationType serializationType); @Override @SuppressWarnings("unchecked") void set(final String cacheKey, final int expiration, final Object value, final SerializationType serializationType); @Override void setSilently(final String cacheKey, final int expiration, final Object value, final SerializationType serializationType); @Override boolean add(final String cacheKey, final int expiration, final Object value, final SerializationType serializationType); @Override boolean addSilently(final String cacheKey, final int expiration, final Object value, final SerializationType serializationType); @Override Map<String, Object> getBulk(final Collection<String> keys, final SerializationType serializationType); @Override long decr(final String key, final int by); @Override boolean delete(final String key); @Override void delete(final Collection<String> keys); @Override void flush(); @Override long incr(final String key, final int by, final long def); @Override long incr(final String key, final int by, final long def, final int exp); @Override boolean isEnabled(); @Override Long getCounter(final String cacheKey); @Override void setCounter(final String cacheKey, final int expiration, final long value); @Override void shutdown(); @Override Object getNativeClient();  }
@Test public void getAvailableServers() { @SuppressWarnings("unchecked") Collection<SocketAddress> addresses = Mockito.mock(Collection.class); Mockito.when(cacheClient.getAvailableServers()).thenReturn(addresses); assertSame(addresses, cache.getAvailableServers()); }