public void validate() {
        final String[] patterns = value().toArray(new String[0]);
        Automaton automaton = Regex.simpleMatchToAutomaton(patterns);
        final CharacterRunAutomaton characterRunAutomaton = new CharacterRunAutomaton(automaton);
        final boolean isHostMatching = characterRunAutomaton.run(remoteHost.getHost() + ":" + remoteHost.getPort());
        if (!isHostMatching) {
            throw new IllegalArgumentException("Provided allowlist[" + rawValue + "] doesn't match remote host address[" + remoteHost + "]");
        }
    }
@Test
    void testRegexValidationOK() {
        final RemoteReindexAllowlist allowlist = new RemoteReindexAllowlist(URI.create("http://10.0.1.28:9200"), "10.0.1.*:9200");
        allowlist.validate();
    }