### Question:
StatCalculator { public static void main(String[] args) { if (!isValidNumberOfArguments(args)) { throw new IllegalArgumentException("Invalid/Missing Arguments"); } TransportClient dataClient = null; TransportClient statClient = null; Configuration configuration = null; try { configuration = new StatConfiguration(args[0]).getInstance(); logger.info("Loading configuration file at : '{}'", ((PropertiesConfiguration) configuration).getPath()); dataClient = ClientProvider.getDataClient(configuration); statClient = ClientProvider.getStatClient(configuration); } catch (Exception e) { logger.error(e.getMessage(), e); } try { run(dataClient, statClient, configuration); } catch (Exception ex) { logger.error(ex.getMessage(), ex); } finally { if (dataClient != null) { dataClient.close(); } if (statClient != null) { statClient.close(); } } }  static void main(String[] args); static void run(TransportClient dataClient, TransportClient statClient, Configuration configuration); static void buildStatisticsBasedOnConfiguration(
            TransportClient dataClient,
            TransportClient statClient,
            StatContainer statContainer); static void loadDefaultStatParameters(String statIndex,
                                                 String statTypeNumeric,
                                                 String statTypeString,
                                                 String statTypeTerm,
                                                 String statTypeGlobal);  }### Answer:
@Test public void statCalculatorInvalidArgumentsTest() { try { StatCalculator.main(new String[]{}); fail("Exception not thrown"); } catch (Exception expected) { } }