@Override
  public Schema getSchema(SchemaPath schemaPath) throws IOException {
    GetSchemaRequest request = GetSchemaRequest.newBuilder().setName(schemaPath.getPath()).build();
    return fromPubsubSchema(schemaServiceStub().getSchema(request));
  }
@Test
  public void getProtoSchema() throws IOException {
    String schemaDefinition =
        "syntax = \"proto3\"; message ProtocolBuffer { string string_field = 1; int32 int_field = 2; }";
    initializeClient(null, null);
    final Schema schema =
        com.google.pubsub.v1.Schema.newBuilder()
            .setName(SCHEMA.getPath())
            .setType(Schema.Type.PROTOCOL_BUFFER)
            .setDefinition(schemaDefinition)
            .build();
    SchemaServiceImplBase schemaImplBase =
        new SchemaServiceImplBase() {
          @Override
          public void getSchema(GetSchemaRequest request, StreamObserver<Schema> responseObserver) {
            if (request.getName().equals(SCHEMA.getPath())) {
              responseObserver.onNext(schema);
              responseObserver.onCompleted();
            }
          }
        };
    Server server =
        InProcessServerBuilder.forName(channelName).addService(schemaImplBase).build().start();
    try {
      assertThrows(
          "Pub/Sub Schema type PROTOCOL_BUFFER is not supported at this time",
          IllegalArgumentException.class,
          () -> client.getSchema(SCHEMA));
    } finally {
      server.shutdownNow();
    }
  }