ProtoUtils { public static <T extends Message> Metadata.Key<T> keyForProto(T instance) { return Metadata.Key.of( instance.getDescriptorForType().getFullName() + Metadata.BINARY_HEADER_SUFFIX, ProtoLiteUtils.metadataMarshaller(instance)); } private  ProtoUtils(); @Deprecated static Marshaller<T> marshaller(final T defaultInstance); static Marshaller<T> marshaller(final T defaultInstance); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1786") static Marshaller<T> jsonMarshaller(final T defaultInstance); static Metadata.Key<T> keyForProto(T instance);  }
@Test public void keyForProto() { assertEquals("google.protobuf.Type-bin", ProtoUtils.keyForProto(Type.getDefaultInstance()).originalName()); }