@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 testMissingToken() throws Exception {
        Endpoint endpoint = component.createEndpoint("splunk-hec:localhost:18808");
        Exception e = assertThrows(IllegalArgumentException.class, endpoint::init);
        assertEquals("A token must be defined", e.getMessage());
    }