@Test public void getSeparatorShouldReturnEmptyWhenColonIsPresentInPrefix() { String separator = SeparatorUtil.getSeparator("regex:(.*)@localhost"); assertThat(separator).isEqualTo(""); }
public static String getSeparator(String targetString) { return mayContainComma(targetString) .or(() -> mayContainSemicolon(targetString)) .or(() -> mayContainColon(targetString)) .orElse(""); }
SeparatorUtil { public static String getSeparator(String targetString) { return mayContainComma(targetString) .or(() -> mayContainSemicolon(targetString)) .or(() -> mayContainColon(targetString)) .orElse(""); } }
SeparatorUtil { public static String getSeparator(String targetString) { return mayContainComma(targetString) .or(() -> mayContainSemicolon(targetString)) .or(() -> mayContainColon(targetString)) .orElse(""); }  }
SeparatorUtil { public static String getSeparator(String targetString) { return mayContainComma(targetString) .or(() -> mayContainSemicolon(targetString)) .or(() -> mayContainColon(targetString)) .orElse(""); }  static String getSeparator(String targetString); }
SeparatorUtil { public static String getSeparator(String targetString) { return mayContainComma(targetString) .or(() -> mayContainSemicolon(targetString)) .or(() -> mayContainColon(targetString)) .orElse(""); }  static String getSeparator(String targetString);  }