VariableField variableField = Fields.createUserVariableField(sourcedoc, "test_simple_variable","testReplacewithField");
Assert.assertNotNull(variableField);
TextSpanElement newTextSpanElement = sourcedoc.newParagraph("Update Variable Field:").newTextSpanElement();
variableField.updateField("simple variable content", newTextSpanElement);
newTextSpanElement = sourcedoc.newParagraph("Show Variable Field:").newTextSpanElement();
variableField.displayField(newTextSpanElement);
Field orgField = sourcedoc.getVariableFieldByName("test_simple_variable");
// 6 Simple, at the middle of original Paragraph, split original
// Paragraph, insert before the second Paragraph.
search = new TextNavigation("SIMPLE", doc);
while (search.hasNext()) {