@Test
public void generateSalt_usesCorrectSecureRandom() {

  final InternalEncryptionService mockEncryptionService = mock(InternalEncryptionService.class);
  when(mockEncryptionService.getSecureRandom()).thenReturn(new SecureRandom());
  subject = new PasswordBasedKeyProxy("some password", 1, mockEncryptionService);
  subject.generateSalt();
  verify(mockEncryptionService).getSecureRandom();
}