@Test
void compileToPattern() {

    assertEquals(RegExHelper.compileToPattern(""), Optional.empty());
    assertEquals(RegExHelper.compileToPattern(null), Optional.empty());
    assertEquals(RegExHelper.compileToPattern("["), Optional.empty());
    assertEquals(RegExHelper.compileToPattern("abc\\s+").map(Pattern::pattern), Optional.of(Pattern.compile("abc\\s+")).map(Pattern::pattern));
}