### Question:
HTMLDataTypeRepresentation { static List<String> breakLongLineAtWordBoundaries(String lineStr, int maxLineLen) { List<String> result = new ArrayList<>(); StringBuilder lineBuffer = new StringBuilder(); StringTokenizer tokenizer = new StringTokenizer(lineStr, CHARACTER_SPACE, true); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); while (!token.isEmpty()) { int lineCharsAvail = maxLineLen - lineBuffer.length(); if (lineCharsAvail < token.length() && token.length() < maxLineLen) { result.add(lineBuffer.toString()); lineBuffer.setLength(0); lineCharsAvail = maxLineLen; } int partLen = Math.min(lineCharsAvail, token.length()); String part = token.substring(0, partLen); lineBuffer.append(part); token = token.substring(partLen); if (lineBuffer.length() >= maxLineLen) { result.add(lineBuffer.toString()); lineBuffer.setLength(0); } } } if (lineBuffer.length() > 0) { result.add(lineBuffer.toString()); } return result; } protected  HTMLDataTypeRepresentation(); protected  HTMLDataTypeRepresentation(String htmlText); String getHTMLString(); String getHTMLContentString(); abstract HTMLDataTypeRepresentation[] diff(
			HTMLDataTypeRepresentation otherRepresentation);  }### Answer:
@Test public void testBreakLongLines() { List<String> l0 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries("", 10); assertEquals(0, l0.size()); List<String> l1 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries("a", 10); assertEquals(1, l1.size()); assertEquals("a", l1.get(0)); List<String> l2 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries("a b", 10); assertEquals(1, l2.size()); assertEquals("a b", l2.get(0)); List<String> l3 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries("a b c", 10); assertEquals(1, l3.size()); assertEquals("a b c", l3.get(0)); List<String> l3a = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries("aaa bbb ccc ddd", 10); assertEquals(2, l3a.size()); assertEquals("aaa bbb ", l3a.get(0)); assertEquals("ccc ddd", l3a.get(1)); List<String> l4 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries( "a bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb c", 10); assertEquals(4, l4.size()); assertEquals("a bbbbbbbb", l4.get(0)); assertEquals("bbbbbbbbbb", l4.get(1)); assertEquals("bbbbbb c", l4.get(3)); List<String> l5 = HTMLDataTypeRepresentation.breakLongLineAtWordBoundaries( "a bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccc dd", 10); assertEquals(6, l5.size()); assertEquals("a bbbbbbbb", l5.get(0)); assertEquals("bbbbbbbbbb", l5.get(1)); assertEquals("bbbbbbbbbb", l5.get(2)); assertEquals("bbbbbb ", l5.get(3)); assertEquals("ccccccccc ", l5.get(4)); assertEquals("dd", l5.get(5)); }