@Test public void metadataMarshaller_invalid() { Metadata.BinaryMarshaller<Type> metadataMarshaller = ProtoLiteUtils.metadataMarshaller(Type.getDefaultInstance()); try { metadataMarshaller.parseBytes(new byte[] {-127}); fail("Expected exception"); } catch (IllegalArgumentException ex) { assertNotNull(((InvalidProtocolBufferException) ex.getCause()).getUnfinishedMessage()); } }
public static <T extends MessageLite> Metadata.BinaryMarshaller<T> metadataMarshaller( T defaultInstance) { return new MetadataMarshaller<T>(defaultInstance); }
ProtoLiteUtils { public static <T extends MessageLite> Metadata.BinaryMarshaller<T> metadataMarshaller( T defaultInstance) { return new MetadataMarshaller<T>(defaultInstance); } }
ProtoLiteUtils { public static <T extends MessageLite> Metadata.BinaryMarshaller<T> metadataMarshaller( T defaultInstance) { return new MetadataMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); }
ProtoLiteUtils { public static <T extends MessageLite> Metadata.BinaryMarshaller<T> metadataMarshaller( T defaultInstance) { return new MetadataMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1787") static void setExtensionRegistry(ExtensionRegistryLite newRegistry); static Marshaller<T> marshaller(T defaultInstance); static Metadata.BinaryMarshaller<T> metadataMarshaller(
      T defaultInstance); }
ProtoLiteUtils { public static <T extends MessageLite> Metadata.BinaryMarshaller<T> metadataMarshaller( T defaultInstance) { return new MetadataMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1787") static void setExtensionRegistry(ExtensionRegistryLite newRegistry); static Marshaller<T> marshaller(T defaultInstance); static Metadata.BinaryMarshaller<T> metadataMarshaller(
      T defaultInstance);  }