@TestOnly
  public Element writeTemplateContext(@Nullable TemplateContext defaultContext) {
    return writeTemplateContext(defaultContext, getIdToType());
  }
@TestOnly
  public Element writeTemplateContext(@Nullable TemplateContext defaultContext)