@Override
  public Schema getSchema(SchemaPath schemaPath) throws IOException {
    com.google.api.services.pubsub.model.Schema pubsubSchema =
        pubsub.projects().schemas().get(schemaPath.getPath()).execute();
    return fromPubsubSchema(pubsubSchema);
  }
@Test
  public void getProtoSchema() throws IOException {
    String schemaDefinition =
        "syntax = \"proto3\"; message ProtocolBuffer { string string_field = 1; int32 int_field = 2; }";
    Schema schema =
        new Schema()
            .setName(SCHEMA.getPath())
            .setType("PROTOCOL_BUFFER")
            .setDefinition(schemaDefinition);
    when(mockPubsub.projects().schemas().get(SCHEMA.getPath()).execute()).thenReturn(schema);
    client = new PubsubJsonClient(null, null, mockPubsub);
    assertThrows(
        "Pub/Sub Schema type PROTOCOL_BUFFER is not supported at this time",
        IllegalArgumentException.class,
        () -> client.getSchema(SCHEMA));
  }