CommonCLIBuilder { public static String getConfigOption(CommandLine cli) { return cli.getOptionValue(CommonCLIBuilder.CONFIG_OPT); }  static CommandLine parseOptions(Class<?> clazz, String[] args, Options options); static Options getCommonOptions(); static String getConfigOption(CommandLine cli); static final String CONFIG_OPT; }
@Test public void testGetConfigOption() { Options options = CommonCLIBuilder.getCommonOptions(); String configValue = "test-config"; String[] args = new String[] { "-c", configValue }; CommandLine cli = CommonCLIBuilder.parseOptions(this.getClass(), args, options); String configResult = CommonCLIBuilder.getConfigOption(cli); assertEquals(configValue, configResult); }