use of org.springframework.cloud.stream.schema.client.ConfluentSchemaRegistryClient in project spring-cloud-stream by spring-cloud.
the class ConfluentSchemaRegistryClientTests method schemaNotFound.
@Test(expected = SchemaNotFoundException.class)
public void schemaNotFound() {
this.mockRestServiceServer.expect(requestTo("http://localhost:8081/subjects/user/versions/1")).andExpect(method(HttpMethod.GET)).andExpect(header("Content-Type", "application/vnd.schemaregistry.v1+json")).andExpect(header("Accept", "application/vnd.schemaregistry.v1+json")).andRespond(withStatus(HttpStatus.NOT_FOUND));
ConfluentSchemaRegistryClient client = new ConfluentSchemaRegistryClient(this.restTemplate);
SchemaReference reference = new SchemaReference("user", 1, "avro");
String schema = client.fetch(reference);
}
Aggregations