### Question:
ServiceDescriptor { @Override public String toString() { return MoreObjects.toStringHelper(this) .add("name", name) .add("schemaDescriptor", schemaDescriptor) .add("methods", methods) .omitNullValues() .toString(); } ServiceDescriptor(String name, MethodDescriptor<?, ?>... methods);  ServiceDescriptor(String name, Collection<MethodDescriptor<?, ?>> methods); private  ServiceDescriptor(Builder b); String getName(); Collection<MethodDescriptor<?, ?>> getMethods(); @Nullable @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") Object getSchemaDescriptor(); static Builder newBuilder(String name); @Override String toString();  }### Answer:
@Test public void toStringTest() { ServiceDescriptor descriptor = new ServiceDescriptor("package.service", Arrays.<MethodDescriptor<?, ?>>asList( MethodDescriptor.<Void, Void>newBuilder() .setType(MethodType.UNARY) .setFullMethodName(MethodDescriptor.generateFullMethodName("package.service", "methodOne")) .setRequestMarshaller(TestMethodDescriptors.voidMarshaller()) .setResponseMarshaller(TestMethodDescriptors.voidMarshaller()) .build(), MethodDescriptor.<Void, Void>newBuilder() .setType(MethodType.UNARY) .setFullMethodName(MethodDescriptor.generateFullMethodName("package.service", "methodTwo")) .setRequestMarshaller(TestMethodDescriptors.voidMarshaller()) .setResponseMarshaller(TestMethodDescriptors.voidMarshaller()) .build())); String toString = descriptor.toString(); assertTrue(toString.contains("ServiceDescriptor")); assertTrue(toString.contains("name=package.service")); assertTrue(toString.contains("package.service/methodOne")); assertTrue(toString.contains("package.service/methodTwo")); }