@Test
public void testDontAllowRequiredOptionsWithDefaults2() throws Exception {

    expect.expectMessage("Required options cannot have default values");
    commandLine.newOption().shortOption("a").required(true).hasValue(false, true);
}