OrientKeyStoreStorage extends ComponentSupport implements KeyStoreStorage { @Override public boolean modified() { return loadedVersion == null ? exists() : (latestVersion != null && !latestVersion.equals(loadedVersion)); } OrientKeyStoreStorage(final OrientKeyStoreStorageManager storageManager, final String keyStoreName); @VisibleForTesting String getKeyStoreName(); @Override boolean exists(); @Override boolean modified(); @Subscribe void onKeyStoreDataUpdated(final KeyStoreDataEvent event); @Override void load(final KeyStore keyStore, final char[] password); @Override void save(final KeyStore keyStore, final char[] password); @Override String toString();  }
@Test public void testModified() { assertThat(storage.modified(), is(false)); when(storageManager.load(KEY_STORE_NAME)).thenReturn(new OrientKeyStoreData()); assertThat(storage.modified(), is(true)); }