EncryptionKeyService { public EncryptionKey getActiveKey() { return this.activeKey; } EncryptionKeyService(
            final @Value("${encryption.active_key_label}") String activeKeyLabel,
            final @Value("#{@config['encryption']['encryption_keys']}") List<EncryptionKey> encryptionKeys); EncryptionKey getActiveKey(); Optional<EncryptionKey> getKey(String keyLabel);  }
@Test public void shouldFetchValidEncryptionActiveKeyPassphrase() throws EncryptionServiceException { String passphrase = encryptionKeyService.getActiveKey().getPassphrase(); assertThat(passphrase, is("some-passphrase")); byte[] cipherValue = encryptionKeyService.getActiveKey().encrypt("plain-text"); assertThat(cipherValue, is(notNullValue())); assertThat(new String(encryptionKeyService.getActiveKey().decrypt(cipherValue)), is("plain-text")); }