*/
public class TestSetJavaPropertiesHandler extends TestCase {
public void testSettingOfProperties() {
String property = "test.property";
SetJavaPropertiesHandler handler = new SetJavaPropertiesHandler();
handler.setPropertyNames(Lists.newArrayList(property));
CmdLineOption option = createAdvancedOption("testOption", handler);
CmdLineOptionInstance optionInstance = createOptionInstance(option, "Hello", "World");
assertNull(System.getProperty(property));
handler.handleOption(null, optionInstance);
assertEquals("Hello World", System.getProperty(property));
option.setType(List.class);
handler.handleOption(null, optionInstance);
assertEquals("Hello,World", System.getProperty(property));
}