public static String convertLikePatternToRegex(final String pattern) {
        String result = pattern;
        if (pattern.contains("_")) {
            result = SINGLE_CHARACTER_PATTERN.matcher(result).replaceAll("$1.");
            result = SINGLE_CHARACTER_ESCAPE_PATTERN.matcher(result).replaceAll("_");
        }
        if (pattern.contains("%")) {
            result = ANY_CHARACTER_PATTERN.matcher(result).replaceAll("$1.*");
            result = ANY_CHARACTER_ESCAPE_PATTERN.matcher(result).replaceAll("%");
        }
        return result;
    }
@Test
    void assertConvertLikePatternToRegexWhenStartWithPattern() {
        assertThat(RegexUtils.convertLikePatternToRegex("_sharding"), is(".sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("%sharding"), is(".*sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("%_sharding"), is(".*.sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("\\_sharding"), is("_sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("\\%sharding"), is("%sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("\\%\\_sharding"), is("%_sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("_\\_sharding"), is("._sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("%\\%sharding"), is(".*%sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("_\\%sharding"), is(".%sharding"));
        assertThat(RegexUtils.convertLikePatternToRegex("\\_%sharding"), is("_.*sharding"));
    }