static Pattern getAuthenticationSkipPathPattern(final List<String> skipPaths) {
    // We add in all the hardcoded paths that don't require authentication/authorization
    final Set<String> unauthenticatedPaths = new HashSet<>(KSQL_AUTHENTICATION_SKIP_PATHS);
    // And then we add anything from the property authentication.skip.paths
    // This preserves the behaviour from the previous Jetty based implementation
    unauthenticatedPaths.addAll(skipPaths);
    final String paths = String.join(",", unauthenticatedPaths);
    final String converted = convertCommaSeparatedWilcardsToRegex(paths);
    return Pattern.compile(converted);
  }
@Test
  public void shouldBuildRegexThatRespectsSkipPaths() {
    // Given:
    final List<String> configs = ImmutableList.of("/heartbeat", "/lag");

    // When:
    final Pattern skips = AuthHandlers.getAuthenticationSkipPathPattern(configs);

    // Then:
    assertThat(skips.matcher("/heartbeat").matches(), is(true));
    assertThat(skips.matcher("/lag").matches(), is(true));
    assertThat(skips.matcher("/foo").matches(), is(false));
  }