@Test public void testAndroidConfigurationSanitization() { try { System.setProperty("aerogear.android.batchSize", "1005"); SenderConfiguration configuration = provider.produceAndroidConfiguration(); assertEquals(10, configuration.batchesToLoad()); assertEquals(1000, configuration.batchSize()); } finally { System.clearProperty("aerogear.android.batchSize"); } }
@Produces @ApplicationScoped @SenderType(VariantType.ANDROID) public SenderConfiguration produceAndroidConfiguration() { return loadConfigurationFor(VariantType.ANDROID, new SenderConfiguration(10, 1000)); }
SenderConfigurationProvider { @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) public SenderConfiguration produceAndroidConfiguration() { return loadConfigurationFor(VariantType.ANDROID, new SenderConfiguration(10, 1000)); } }
SenderConfigurationProvider { @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) public SenderConfiguration produceAndroidConfiguration() { return loadConfigurationFor(VariantType.ANDROID, new SenderConfiguration(10, 1000)); }  }
SenderConfigurationProvider { @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) public SenderConfiguration produceAndroidConfiguration() { return loadConfigurationFor(VariantType.ANDROID, new SenderConfiguration(10, 1000)); }  @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) SenderConfiguration produceAndroidConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.IOS) SenderConfiguration produceIosConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.IOS_TOKEN) SenderConfiguration produceIosTokenConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.WEB_PUSH) SenderConfiguration produceWebPushConfiguration(); }
SenderConfigurationProvider { @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) public SenderConfiguration produceAndroidConfiguration() { return loadConfigurationFor(VariantType.ANDROID, new SenderConfiguration(10, 1000)); }  @Produces @ApplicationScoped @SenderType(VariantType.ANDROID) SenderConfiguration produceAndroidConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.IOS) SenderConfiguration produceIosConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.IOS_TOKEN) SenderConfiguration produceIosTokenConfiguration(); @Produces @ApplicationScoped @SenderType(VariantType.WEB_PUSH) SenderConfiguration produceWebPushConfiguration();  }