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 testFindMethodDescriptor() {
      // This is the simple HelloService with no dependencies.
      String base64ProtobufDescriptor = "CrICCg5oZWxsby12MS5wcm90bxIgaW8uZ2l0aHViLm1pY3JvY2tzLmdycGMuaGVsbG8udjEiSAoMSGVsbG9SZXF1ZXN0EhwKCWZpcnN0bmFtZRgBIAEoCVIJZmlyc3RuYW1lEhoKCGxhc3RuYW1lGAIgASgJUghsYXN0bmFtZSIrCg1IZWxsb1Jlc3BvbnNlEhoKCGdyZWV0aW5nGAEgASgJUghncmVldGluZzJ7CgxIZWxsb1NlcnZpY2USawoIZ3JlZXRpbmcSLi5pby5naXRodWIubWljcm9ja3MuZ3JwYy5oZWxsby52MS5IZWxsb1JlcXVlc3QaLy5pby5naXRodWIubWljcm9ja3MuZ3JwYy5oZWxsby52MS5IZWxsb1Jlc3BvbnNlQgJQAWIGcHJvdG8z";

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

      assertNotNull(desc);
      assertEquals("io.github.microcks.grpc.hello.v1.HelloService.greeting", desc.getFullName());
   }