ProfileStorageCredentialsServiceImpl implements ProfileStorageCredentialsService { @Override public void registerStorageCredentials( UserIDAuth user, StorageIdentifier storageId, StorageCredentials credentials) { validateKeystoreAccess(user); keyStoreOper.addStorageCredentials(user, storageId, credentials); } @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 registerStorageCredentials() { tested.registerStorageCredentials(user, storageIdentifier, storageCredentials); verify(privateKeyService).validateUserHasAccessOrThrow(user); verify(storageKeyStoreOper).addStorageCredentials(user, storageIdentifier, storageCredentials); }