Flags { public Flags loadOpts(Class<?> c) { classes.add(c); return loadOpts(c, false); }  Flags loadOpts(Class<?> c); Flags loadOpts(final Object o); void setVersionString(final String versionString); List<String> getNonOptionArguments(); Flags parse(String[] args); void printHelp(OutputStream out); void printVersion(final OutputStream out); boolean helpFlagged(); boolean versionFlagged(); boolean propertiesFlagged(); void printFlags(); List<Flag> getFlagsAsList();  }
@Test (expected = IllegalArgumentException.class) public void testMultipleFlagsWithSameName() { Flags flags = new Flags() .loadOpts(FlagsAllLegalFields.class) .loadOpts(FlagsDoubleName.class); }
@Test (expected = IllegalArgumentException.class) public void testUnsupportedVariable() { Flags flags = new Flags() .loadOpts(FlagsWrongVariable.class); }
@Test (expected = IllegalArgumentException.class) public void testNotStaticVariable() { Flags flags = new Flags() .loadOpts(FlagsNonStaticVariable.class); }