ThExporter { public static String replaceCentreline(String original, String replacementText) { String newContent = original.replaceFirst( "(?s)(\\s*?(centreline|centerline)(.*)(endcentreline|endcenterline)\\s*)", replacementText); return newContent; }  static String getContent(Context context, Survey survey, List<String> th2Files); static String updateOriginalContent(
            Survey survey, String originalFileContent, List<String> th2Files); static String replaceCentreline(String original, String replacementText); static String replaceInputsText(String original, String replacementText); static String indent(String text); static final char COMMENT_CHAR; static final String DATE_PATTERN; }
@Test public void testReplaceCentreline() { String updated = new ThExporter().replaceCentreline(TEST_CONTENT, "replacement"); Assert.assertTrue(updated.contains("replacement")); Assert.assertFalse(updated.contains("Calculated")); }