@Override
  public Schema getSourceSchema() {
    String registryUrl = getStringWithAltKeys(config, HoodieSchemaProviderConfig.SRC_SCHEMA_REGISTRY_URL);
    try {
      return parseSchemaFromRegistry(registryUrl);
    } catch (Exception e) {
      throw new HoodieSchemaFetchException(String.format(
          "Error reading source schema from registry. Please check %s is configured correctly. Truncated URL: %s",
          Config.SRC_SCHEMA_REGISTRY_URL_PROP,
          StringUtils.truncate(registryUrl, 10, 10)), e);
    }
  }
@Test
  public void testGetSourceSchemaShouldRequestSchemaWithoutCreds() throws Exception {
    TypedProperties props = getProps();
    props.put("hoodie.deltastreamer.schemaprovider.registry.url", "http://localhost/subjects/test/versions/latest");
    SchemaRegistryProvider underTest = getUnderTest(props, -1, true);
    Schema actual = underTest.getSourceSchema();
    assertNotNull(actual);
    assertEquals(getExpectedConvertedSchema(), actual);
    verify(mockRestService, never()).setHttpHeaders(any());
  }