private Result getResult() {
        try {
            return (Result)getResponse();
        } catch (ClassCastException e) {
            throw new IllegalStateException("PageTemplatesXmlRenderer attempted used outside a search context, got a " +
                                            getResponse().getClass().getName());
        }
    }
Writes a hit's default attributes like 'type', 'source', 'relevance'.
container-search/src/main/java/com/yahoo/search/pagetemplates/result/PageTemplatesXmlRenderer.java