RedisCache extends AbstractRemoteCache { public byte[] get(String key) { RBucket<byte[]> bucket = getClient().getBucket(key, ByteArrayCodec.INSTANCE); return bucket.get(); } RedisCache(); byte[] get(String key); void set(String key, byte[] value); void set(String key, byte[] value, int expireIn); void delete(String key); Lock acquireLock(String lockName); @Override CheckResult checkConnection();  }
@Test public void testGet() { RBucket<byte[]> bucket = client.getBucket("test", ByteArrayCodec.INSTANCE); bucket.set("abcd".getBytes()); assertArrayEquals("abcd".getBytes(), cache.get("test")); }
@Test public void testGetNotExist() { assertNull(cache.get("whatever")); }