### Question:
RealmPublicKeyCacheServiceImpl implements RealmPublicKeyCacheService { String generateKey(String realm) { return keyPattern + realm; } RealmPublicKeyCacheServiceImpl(String keyPattern, RedisTemplate<String, String> redisTemplate); void put(String key, String value); @Override String getPublicKeyByRealm(String realm); @Override Map<String, String> getAllPublicKeys();  }### Answer:
@Test void generateKey() { String actualKey = publicKeyCacheService.generateKey(SOME_REALM); assertThat(actualKey, is(keyPattern + SOME_REALM)); }