@Override
    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        if (remaining.split("/").length > 1) {
            throw new IllegalArgumentException("Invalid URI: " + URISupport.sanitizeUri(uri));
        }

        SplunkHECEndpoint answer = new SplunkHECEndpoint(uri, this, new SplunkHECConfiguration());
        setProperties(answer, parameters);
        answer.setSplunkURL(remaining);

        return answer;
    }
@Test
    public void testInvalidUriSyntax() {
        Exception e = assertThrows(IllegalArgumentException.class, () -> component.createEndpoint(
                "splunk-hec:bad/path"));
        assertEquals("Invalid URI: splunk-hec:bad/path", e.getMessage());
    }