/**
   * Ensures the content and content blob fields are loaded lazy.
   *
   * <p>
   *
   * @throws Exception in case the test fails
   */
  public void testLazyContentFields() throws Exception {

    echo("Testing lazy status of content fields in search index");

    String fileName = "/sites/default/test/master.pdf";

    CmsSearchIndex searchIndex = OpenCms.getSearchManager().getIndex(INDEX_SPECIAL);
    Document doc = searchIndex.getDocument(CmsSearchField.FIELD_PATH, fileName);

    assertNotNull("Document '" + fileName + "' not found", doc);
    assertNotNull("No 'content' field available", doc.getFieldable(CmsSearchField.FIELD_CONTENT));
    assertTrue("Content field not lazy", doc.getFieldable(CmsSearchField.FIELD_CONTENT).isLazy());
    assertNotNull(
        "No 'content blob' field available", doc.getFieldable(CmsSearchField.FIELD_CONTENT_BLOB));
    assertTrue(
        "Content blob field not lazy",
        doc.getFieldable(CmsSearchField.FIELD_CONTENT_BLOB).isLazy());
  }