public static boolean acceptEndpoint(String endpointUrl) {
      return endpointUrl != null && endpointUrl.matches(ENDPOINT_PATTERN_STRING);
   }
@Test
   public void testAcceptEndpoint() {

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost/q/testQueue"));

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost/vHost/q/testQueue"));

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost:5671/q/testQueue"));

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost:5671/vHost/q/testQueue"));

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost:5671/q/testQueue/with/path/elements"));

      assertTrue(
            AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost:5671/vHost/q/testQueue/with/path/elements"));

      assertTrue(AMQPMessageConsumptionTask.acceptEndpoint("amqp://localhost:5671/f/testExchange?durable=true"));

      assertTrue(AMQPMessageConsumptionTask
            .acceptEndpoint("amqp://localhost:5671/t/testExchange?durable=true&routingKey=samples.*"));

      assertTrue(AMQPMessageConsumptionTask
            .acceptEndpoint("amqp://localhost:5671/vHost/t/testExchange?durable=true&routingKey=samples.*"));
   }