code: public S getSchemaByKey(K key) throws SchemaRegistryException {
      try {
        return cachedSchemasByKeys.get(key);
      } catch (ExecutionException e) {
        throw new SchemaRegistryException(String.format("Schema with key %s cannot be retrieved", key), e);
      }
    }
docs: Get schema from schema registry by key.
  @throws SchemaRegistryException if failed to get schema by key.