PduFactoryProvider { public static PduFactory withExtenderConfListener(PduVersion pduVersion, ConfigurationListener<ExtenderConfiguration> extenderConfigurationListener) { return get(pduVersion, null, extenderConfigurationListener); }  static PduFactory get(PduVersion pduVersion); static PduFactory withAggregatorConfListener(PduVersion pduVersion, ConfigurationListener<AggregatorConfiguration> aggregatorConfigurationListener); static PduFactory withExtenderConfListener(PduVersion pduVersion, ConfigurationListener<ExtenderConfiguration> extenderConfigurationListener);  }
@Test public void testFactoryProviderGetWithExtConfListener_OK(){ PduFactory factory = PduFactoryProvider.withExtenderConfListener(PduVersion.V2, extConfListener); Assert.assertNotNull(factory, "Returned factory is null."); }
@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Invalid PDU version 'V1'. Allowed values are: V2") public void testFactoryProviderGetWithExtConfListener_PduVersionDeprecated(){ PduFactory factory = PduFactoryProvider.withExtenderConfListener(PduVersion.V1, extConfListener); Assert.assertNotNull(factory, "Returned factory is null."); }
@Test public void testFactoryProviderGetWithNullExtConfListener_OK(){ PduFactory factory = PduFactoryProvider.withExtenderConfListener(PduVersion.V2, null); Assert.assertNotNull(factory, "Returned factory is null."); }