AnnotatedTextFile { public AnnotatedTextFile() { this(null, null, new Colorer() { public String getColorizedContent(final String content, final String fileExtension, final String encoding) { return content; } }); } AnnotatedTextFile();  AnnotatedTextFile(final String path, final String encoding, final Colorer colorer); void addRow(final Date date, final long revision, final String author, final String content); void colorize(); String getContent(); List<AnnotatedTextFileRow> getUnmodifiableRows(); @Override String toString(); static final Pattern NL_REGEXP; }
@Test public void testAnnotatedTextFile() throws Exception { final AnnotatedTextFile file = new AnnotatedTextFile(); final String row1 = "file row one"; final String row2 = "file row two"; file.addRow(new Date(), 1, "jesper", row1); file.addRow(new Date(), 2, "jesper", row2); assertEquals(row1 + NL + row2 + NL, file.getContent()); }