TsvManifestFormatter extends ManifestFormatterBase { @Override protected String formatLine(String contentMd5, String spaceId, String contentId) { StringBuilder line = new StringBuilder(); line.append(spaceId); line.append(DELIM); line.append(contentId); line.append(DELIM); line.append(contentMd5); return line.toString(); }  @Override String getHeader(); @Override ManifestItem parseLine(String line);  }
@Test public void testGetLine() throws Exception { ContentMessage event = new ContentMessage(); event.setSpaceId(spaceId); event.setContentId(contentId); event.setContentMd5(contentMd5); String line = formatter.formatLine(event); Assert.assertNotNull(line); String expected = spaceId + DELIM + contentId + DELIM + contentMd5; Assert.assertEquals(expected, line); }
@Test public void testGetLineNull() throws Exception { ContentMessage event = new ContentMessage(); String line = formatter.formatLine(event); Assert.assertNotNull(line); String nil = null; String expected = nil + DELIM + nil + DELIM + nil; Assert.assertEquals(expected, line); }