Fields { public static ChapterField createChapterField(OdfElement odfElement) { return new ChapterField(odfElement); } private  Fields(); static DateField createDateField(OdfElement odfElement); static DateField createFixedDateField(OdfElement odfElement); static TimeField createTimeField(OdfElement odfElement); static TimeField createFixedTimeField(OdfElement odfElement); static PageNumberField createPreviousPageNumberField(OdfElement odfElement); static PageNumberField createCurrentPageNumberField(OdfElement odfElement); static PageNumberField createNextPageNumberField(OdfElement odfElement); static PageCountField createPageCountField(OdfElement odfElement); static TitleField createTitleField(OdfElement odfElement); static SubjectField createSubjectField(OdfElement odfElement); static AuthorField createAuthorNameField(OdfElement odfElement); static AuthorField createAuthorInitialsField(OdfElement odfElement); static ChapterField createChapterField(OdfElement odfElement); static ReferenceField createReferenceField(OdfElement odfElement, String referenceName); static VariableField createSimpleVariableField(VariableContainer container, String name); static VariableField createUserVariableField(VariableContainer container, String name, String value); static ConditionField createConditionField(OdfElement odfElement, String condition, String trueText,
			String falseText); static ConditionField createHiddenTextField(OdfElement odfElement, String condition, String text);  }
@Test public void testAddChapterField() { try { TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream(TEST_DOCUMENT)); ChapterField chapterField = Fields.createChapterField(doc.newParagraph("Chapter:")); Assert.assertNotNull(chapterField); } catch (Exception e) { Logger.getLogger(FieldsTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(e.getMessage()); } }