GrpcParser extends MessageProcessor implements RpcResponseParser { @Nullable static String method(String fullMethodName) { int index = fullMethodName.lastIndexOf('/'); if (index == -1 || index == 0) return null; return fullMethodName.substring(index + 1); }  @Override void parse(RpcResponse response, TraceContext context, SpanCustomizer span);  }
@Test public void method() { assertThat(GrpcParser.method(METHOD_DESCRIPTOR.getFullMethodName())) .isEqualTo("SayHello"); }
@Test public void method_malformed() { assertThat(GrpcParser.method("/")).isNull(); }