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

      assertFalse(NATSMessageConsumptionTask.acceptEndpoint("ssl://localhost:1883/testTopic"));

      assertFalse(NATSMessageConsumptionTask.acceptEndpoint("mqtt://localhost:1883"));

      assertFalse(NATSMessageConsumptionTask.acceptEndpoint("nats://localhost:port/testTopic"));
   }