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

      assertFalse(GooglePubSubMessageConsumptionTask.acceptEndpoint("googlepubsub:///my-own-project-id"));

      assertFalse(GooglePubSubMessageConsumptionTask.acceptEndpoint("googlepubsub:///my-own-project-id/my/topic/name"));

      assertFalse(GooglePubSubMessageConsumptionTask.acceptEndpoint("rabbit://localhost/x/testChannel"));
   }