KeyStoreStorageManagerImpl implements KeyStoreStorageManager { @Override public KeyStoreStorage createStorage(final String keyStoreName) { checkNotNull(keyStoreName); return new FileKeyStoreStorage(new File(basedir, keyStoreName)); } @Inject  KeyStoreStorageManagerImpl(final ApplicationDirectories directories); @VisibleForTesting  KeyStoreStorageManagerImpl(final File basedir); @Override KeyStoreStorage createStorage(final String keyStoreName);  }
@Test public void testCreateStorage() { KeyStoreStorage storage = storageManager.createStorage("test.ks"); assertThat(storage, is(instanceOf(FileKeyStoreStorage.class))); assertThat(((FileKeyStoreStorage) storage).getKeyStoreFile(), is(new File(keyStoreDir, "node/test.ks"))); }