@Test public void testMaxThreadsConfiguration() { // setting the option using the type safe method config.setOption( MaxThreadsOption.get(5) ); // checking the type safe getOption() method assertEquals( MaxThreadsOption.get(5), config.getOption( MaxThreadsOption.class ) ); // checking the string based getProperty() method assertEquals( "5", config.getProperty( MaxThreadsOption.PROPERTY_NAME ) ); // setting the options using the string based setProperty() method config.setProperty( MaxThreadsOption.PROPERTY_NAME, "8" ); // checking the type safe getOption() method assertEquals( MaxThreadsOption.get(8), config.getOption( MaxThreadsOption.class ) ); // checking the string based getProperty() method assertEquals( "8", config.getProperty( MaxThreadsOption.PROPERTY_NAME ) ); }
return MaxThreadsOption.get(legacyOption.getMaxThreads());