static void validateEndpoint(String endpoint, String endpointName) throws MisfireException {
        if (StringUtils.isNotEmpty(endpoint)) {
            try {
                new URL(endpoint).toURI();
            } catch (Exception e) {
                // Re-throw the exception to fail the input start attempt
                throw new MisfireException(String.format(Locale.ROOT, "The specified [%s] Override Endpoint [%s] is invalid.",
                        endpointName, endpoint), e);
            }
        }
    }
@Test
    public void testValidateEndpoint() throws MisfireException {

        // Validate that no exception occurs for valid URI.
        KinesisTransport.validateEndpoint("https://graylog.org", "Graylog");

        // Validate that no exception occurs for blank and null URL.
        KinesisTransport.validateEndpoint("", "Blank");
        KinesisTransport.validateEndpoint(null, "Null");

        // Verify exception occurs for invalid URI.
        assertThatThrownBy(() -> KinesisTransport.validateEndpoint("haha not a url", "Bad URI"))
                .isExactlyInstanceOf(MisfireException.class)
                .hasMessageContaining("Override Endpoint")
                .hasMessageContaining("is invalid");
    }