OrientKeyStoreStorageManager extends StateGuardLifecycleSupport implements KeyStoreStorageManager { @Override @Guarded(by = STARTED) public KeyStoreStorage createStorage(final String keyStoreName) { checkNotNull(keyStoreName); OrientKeyStoreStorage storage = new OrientKeyStoreStorage(this, KeyStoreManagerImpl.NAME + '/' + keyStoreName); eventManager.register(storage); storages.add(storage); return storage; } @Inject  OrientKeyStoreStorageManager(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                    final OrientKeyStoreDataEntityAdapter entityAdapter,
                                    final EventManager eventManager); @Override @Guarded(by = STARTED) KeyStoreStorage createStorage(final String keyStoreName); @Guarded(by = STARTED) @Nullable OrientKeyStoreData load(final String keyStoreName); @Guarded(by = STARTED) void save(final OrientKeyStoreData entity);  }
@Test public void testCreateStorage() { KeyStoreStorage storage = storageManager.createStorage(KEY_STORE_NAME); assertThat(storage, is(instanceOf(OrientKeyStoreStorage.class))); assertThat(((OrientKeyStoreStorage) storage).getKeyStoreName(), is("ssl/" + KEY_STORE_NAME)); verify(eventManager).register(storage); }