TitleBuffer { @Override public String toString() { return title.toString(); } TitleBuffer();  TitleBuffer(final Object object);  TitleBuffer(final Object object, final String defaultTitle);  TitleBuffer(final String text); static boolean isEmpty(final Object object); static boolean isEmpty(final String text); TitleBuffer append(final int number); TitleBuffer append(final Object object); TitleBuffer append(final Object object, final String defaultValue); TitleBuffer append(final String text); TitleBuffer append(final String joiner, final Object object); TitleBuffer append(final String joiner, final Object object, final String defaultTitle); TitleBuffer append(final String joiner, final String text); TitleBuffer appendSpace(); final TitleBuffer concat(final Object object); final TitleBuffer concat(final Object object, final String defaultValue); final TitleBuffer concat(final String text); TitleBuffer concat(final String joiner, final String text); final TitleBuffer concat(final String joiner, final Object object); final TitleBuffer concat(final String joiner, final Object object, final String defaultValue); @Override String toString(); TitleBuffer truncate(final int noWords);  }
@Test public void testConstructorsWithObjectWhereDefaultIsNotNeeded() { t1 = new TitleBuffer(objectWithTitle, "test"); assertEquals("ABC Co.", t1.toString()); }
@Test public void testConstructorsWithObjectWhereDefaultIsUsedAsTitle() { t1 = new TitleBuffer(objectWithNoTitle, "test"); assertEquals("test", t1.toString()); }
@Test public void testConstructorWithObject() { final TitleBuffer t = new TitleBuffer(objectWithTitle); assertEquals("ABC Co.", t.toString()); }
@Test public void testConstructorWithObjectWithNoTitle() { final TitleBuffer t = new TitleBuffer(objectWithEmptyTitle); assertEquals("", t.toString()); }
@Test public void testConstructorWithString() { final TitleBuffer t = new TitleBuffer("Test"); assertEquals("Test", t.toString()); }
@Test public void testDefaultConstructor() { final TitleBuffer t = new TitleBuffer(); assertEquals("", t.toString()); }