@Test
public void createKeyProxy_waitsForKeyIfCreationIsDisabled() throws Exception {

  setupAnotherProcessCreatesKey();
  final EncryptionKeyMetadata keyMetadata = new EncryptionKeyMetadata();
  keyMetadata.setEncryptionKeyName("fake_key_name");
  subject = new LunaEncryptionService(connection, false, timedRetry);
  assertThat(subject.createKeyProxy(keyMetadata).getKey(), equalTo(aesKey));
  verify(connection, never()).generateKey();
}