DefaultEncryptionServiceFactory encryptionServiceFactory = new DefaultEncryptionServiceFactory();
PasswordEncryptionServices.PasswordProtectedKeystoreCryptoConfig config = new PasswordEncryptionServices
.PasswordProtectedKeystoreCryptoConfig();
config.setAlias("alias");
config.setKeyStoreFile("file");
config.setPassword("password");
EncryptionService service = encryptionServiceFactory.getService(config,
Robolectric.application.getApplicationContext());