### Question:
MavenCli { int calculateDegreeOfConcurrencyWithCoreMultiplier( String threadConfiguration ) { int procs = Runtime.getRuntime().availableProcessors(); return (int) ( Float.parseFloat( threadConfiguration.replace( "C", "" ) ) * procs ); } MavenCli();  MavenCli( ClassWorld classWorld ); static void main( String[] args ); static int main( String[] args, ClassWorld classWorld ); static int doMain( String[] args, ClassWorld classWorld ); int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr ); int doMain( CliRequest cliRequest ); static final String LOCAL_REPO_PROPERTY; static final String MULTIMODULE_PROJECT_DIRECTORY; static final String USER_HOME; static final File USER_MAVEN_CONFIGURATION_HOME; static final File DEFAULT_USER_TOOLCHAINS_FILE; static final File DEFAULT_GLOBAL_TOOLCHAINS_FILE; static final String STYLE_COLOR_PROPERTY; }### Answer:
@Test public void testCalculateDegreeOfConcurrencyWithCoreMultiplier() { int cores = Runtime.getRuntime().availableProcessors(); assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "C2.2" ) ); assertEquals( (int) ( cores * 2.2 ), cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "2.2C" ) ); try { cli.calculateDegreeOfConcurrencyWithCoreMultiplier( "CXXX" ); fail( "Should have failed with a NumberFormatException" ); } catch ( NumberFormatException e ) { } }