public static Descriptors.MethodDescriptor findMethodDescriptor(String base64ProtobufDescriptor, String serviceName,
         String methodName) throws InvalidProtocolBufferException, Descriptors.DescriptorValidationException {

      // Now we may have serviceName as being the FQDN. We have to find short version to later findServiceByName().
      String shortServiceName = serviceName;
      if (serviceName.contains(".")) {
         shortServiceName = serviceName.substring(serviceName.lastIndexOf(".") + 1);
      }

      // Find descriptor with this service name as symbol.
      Descriptors.FileDescriptor fd = findFileDescriptorBySymbol(base64ProtobufDescriptor, shortServiceName);
      Descriptors.ServiceDescriptor sd = fd.findServiceByName(shortServiceName);

      return sd.findMethodByName(methodName);
   }
@Test
   void testFindMethodDescriptorWithDependency() {
      // This is the GoodbyeService with descriptor embedding the shared/uuid.proto dependency.
      String base64ProtobufDescriptor = "CjsKEXNoYXJlZC91dWlkLnByb3RvEgZzaGFyZWQiFgoEVVVJRBIOCgJpZBgBIAEoCVICaWRiBnByb3RvMwqDAwoQZ29vZGJ5ZS12MS5wcm90bxIiaW8uZ2l0aHViLm1pY3JvY2tzLmdycGMuZ29vZGJ5ZS52MRoRc2hhcmVkL3V1aWQucHJvdG8iSgoOR29vZGJ5ZVJlcXVlc3QSHAoJZmlyc3RuYW1lGAEgASgJUglmaXJzdG5hbWUSGgoIbGFzdG5hbWUYAiABKAlSCGxhc3RuYW1lIlkKD0dvb2RieWVSZXNwb25zZRIaCghmYXJld2VsbBgBIAEoCVIIZmFyZXdlbGwSKgoJbWVzc2FnZUlkGAIgASgLMgwuc2hhcmVkLlVVSURSCW1lc3NhZ2VJZDKEAQoOR29vZGJ5ZVNlcnZpY2UScgoHZ29vZGJ5ZRIyLmlvLmdpdGh1Yi5taWNyb2Nrcy5ncnBjLmdvb2RieWUudjEuR29vZGJ5ZVJlcXVlc3QaMy5pby5naXRodWIubWljcm9ja3MuZ3JwYy5nb29kYnllLnYxLkdvb2RieWVSZXNwb25zZUICUAFiBnByb3RvMw==";

      Descriptors.MethodDescriptor desc = null;
      try {
         desc = GrpcUtil.findMethodDescriptor(base64ProtobufDescriptor, "GoodbyeService", "goodbye");
      } catch (Exception e) {
         fail("No exception should be thrown while parsing protobuf descriptor and searching service");
      }

      assertNotNull(desc);
      assertEquals("io.github.microcks.grpc.goodbye.v1.GoodbyeService.goodbye", desc.getFullName());
   }