### Question:
Util { static String stripLeadingHyphens(String str) { if (str == null) { return null; } if (str.startsWith("--")) { return str.substring(2, str.length()); } else if (str.startsWith("-")) { return str.substring(1, str.length()); } return str; }    }### Answer:
@Test public void testStripLeadingHyphens() { assertEquals("f", Util.stripLeadingHyphens("-f")); assertEquals("foo", Util.stripLeadingHyphens("--foo")); assertEquals("-foo", Util.stripLeadingHyphens("---foo")); assertNull(Util.stripLeadingHyphens(null)); }