@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 testGetSourceSchemaShouldRequestSchemaWithCreds() throws Exception {
    SchemaRegistryProvider underTest = getUnderTest(getProps(), -1, true);
    Schema actual = underTest.getSourceSchema();
    assertNotNull(actual);
    assertEquals(getExpectedConvertedSchema(), actual);
    verify(mockRestService).setHttpHeaders(Collections.singletonMap("Authorization", "Basic " + Base64.getEncoder().encodeToString(BASIC_AUTH.getBytes())));
  }