@Test void tryGetNonExistingKey() { String actualPublicKey = publicKeyCacheService.getPublicKeyByRealm("notExistedKey"); assertThat(actualPublicKey, is(nullValue())); }
@Override public String getPublicKeyByRealm(String realm) { String key = generateKey(realm); logger.info("Trying to get public key for realm `{}`", key); return redisTemplate.opsForValue().get(key); }
RealmPublicKeyCacheServiceImpl implements RealmPublicKeyCacheService { @Override public String getPublicKeyByRealm(String realm) { String key = generateKey(realm); logger.info("Trying to get public key for realm `{}`", key); return redisTemplate.opsForValue().get(key); } }
RealmPublicKeyCacheServiceImpl implements RealmPublicKeyCacheService { @Override public String getPublicKeyByRealm(String realm) { String key = generateKey(realm); logger.info("Trying to get public key for realm `{}`", key); return redisTemplate.opsForValue().get(key); } RealmPublicKeyCacheServiceImpl(String keyPattern, RedisTemplate<String, String> redisTemplate); }
RealmPublicKeyCacheServiceImpl implements RealmPublicKeyCacheService { @Override public String getPublicKeyByRealm(String realm) { String key = generateKey(realm); logger.info("Trying to get public key for realm `{}`", key); return redisTemplate.opsForValue().get(key); } RealmPublicKeyCacheServiceImpl(String keyPattern, RedisTemplate<String, String> redisTemplate); void put(String key, String value); @Override String getPublicKeyByRealm(String realm); @Override Map<String, String> getAllPublicKeys(); }
RealmPublicKeyCacheServiceImpl implements RealmPublicKeyCacheService { @Override public String getPublicKeyByRealm(String realm) { String key = generateKey(realm); logger.info("Trying to get public key for realm `{}`", key); return redisTemplate.opsForValue().get(key); } RealmPublicKeyCacheServiceImpl(String keyPattern, RedisTemplate<String, String> redisTemplate); void put(String key, String value); @Override String getPublicKeyByRealm(String realm); @Override Map<String, String> getAllPublicKeys();  }