@Test public void testNativeUnitModule(@Mocked final CryptoModule module, @Mocked final SSLContext sslContext, @Mocked final KeyStore trustStore, @Mocked final KeyManagerAdapter keyManagerAdapter) { final Map<Key<EncryptionService>, EncryptionService> encryptionServices = new HashMap<>(); final Map<String, KeyStore> keyStores = new HashMap<>(); final CryptoPlugin underTest = new CryptoPlugin(); Deencapsulation.setField(underTest, "encryptionServices", encryptionServices); Deencapsulation.setField(underTest, "keyStores", keyStores); Deencapsulation.setField(underTest, "sslContext", sslContext); Deencapsulation.setField(underTest, "trustStore", trustStore); List<KeyManagerAdapter> keyManagerAdapters = Lists.newArrayList(keyManagerAdapter); Deencapsulation.setField(underTest, "keyManagerAdapters", keyManagerAdapters); underTest.nativeUnitModule(); new Verifications() {{ new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, null); times = 1; }}; }
@Override public Object nativeUnitModule() { return new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, keyManagerClass); }
CryptoPlugin extends AbstractSeedPlugin implements SSLProvider { @Override public Object nativeUnitModule() { return new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, keyManagerClass); } }
CryptoPlugin extends AbstractSeedPlugin implements SSLProvider { @Override public Object nativeUnitModule() { return new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, keyManagerClass); }  }
CryptoPlugin extends AbstractSeedPlugin implements SSLProvider { @Override public Object nativeUnitModule() { return new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, keyManagerClass); }  @Override String name(); @Override InitState initialize(InitContext initContext); @Override Object nativeUnitModule(); @Override Optional<SSLContext> sslContext(); @Override CryptoConfig.SSLConfig sslConfig(); }
CryptoPlugin extends AbstractSeedPlugin implements SSLProvider { @Override public Object nativeUnitModule() { return new CryptoModule(encryptionServices, keyStores, trustStore, sslContext, keyManagerAdapters, keyManagerClass); }  @Override String name(); @Override InitState initialize(InitContext initContext); @Override Object nativeUnitModule(); @Override Optional<SSLContext> sslContext(); @Override CryptoConfig.SSLConfig sslConfig();  }