ProfileStorageCredentialsServiceImpl implements ProfileStorageCredentialsService { @Override public void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId) { validateKeystoreAccess(user); keyStoreOper.removeStorageCredentials(user, storageId); } @Inject  ProfileStorageCredentialsServiceImpl(StorageKeyStoreOperations keyStoreOper,
                                                PrivateKeyService privateKeyService); @Override Set<StorageIdentifier> listRegisteredStorageCredentials(UserIDAuth user); @Override void registerStorageCredentials(
            UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials); @Override void deregisterStorageCredentials(UserIDAuth user, StorageIdentifier storageId);  }
@Test void deregisterStorageCredentials() { tested.deregisterStorageCredentials(user, storageIdentifier); verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storageKeyStoreOper).removeStorageCredentials(user, storageIdentifier); }