HyphenFormatter { boolean containsOption(String cmd) { return Pattern.compile(OPTION_PATTERN).matcher(cmd).find(); }  String formatCommand(String command);  }
@Test public void containsOptionWithOneOptionReturnsTrue() { String cmd = "start locator --name=loc1"; assertTrue(this.formatter.containsOption(cmd)); }
@Test public void containsOptionWithNoOptionReturnsFalse() { String cmd = "start locator"; assertFalse(this.formatter.containsOption(cmd)); }
@Test public void containsOptionWithMultipleOptionsReturnsTrue() { String cmd = "start locator --name=loc1 --J=-Dfoo=bar --J=-Dbar=foo"; assertTrue(this.formatter.containsOption(cmd)); }