public static boolean acceptEndpoint(String endpointUrl) {
      return endpointUrl != null && endpointUrl.matches(ENDPOINT_PATTERN_STRING);
   }
@Test
   void testAcceptEndpointFailures() {
      AsyncTestSpecification specification = new AsyncTestSpecification();
      KafkaMessageConsumptionTask task = new KafkaMessageConsumptionTask(specification);

      assertFalse(KafkaMessageConsumptionTask.acceptEndpoint("localhost:9092/testTopic"));

      assertFalse(KafkaMessageConsumptionTask.acceptEndpoint("ssl://localhost:9092/testTopic"));

      assertFalse(KafkaMessageConsumptionTask.acceptEndpoint("kafka://localhost"));

      assertFalse(KafkaMessageConsumptionTask.acceptEndpoint("kafka://localhost:port"));

      assertFalse(KafkaMessageConsumptionTask.acceptEndpoint("kafka://localhost:port/testTopic"));
   }