### Question:
SubroutineDefinitionHeaderSmoosher implements IndexedSmoosher<String> { @Override public String smoosh(final int startingIndex, final List<String> list) { if (startingIndex < 0) { throw new IllegalArgumentException("Starting index cannot be negative."); } if (list == null) { throw new IllegalArgumentException("List cannot be null."); } if (list.isEmpty()) { throw new IllegalArgumentException("List cannot be empty."); } if (startingIndex >= list.size()) { throw new IllegalArgumentException("Starting index exceeds list size; index = " + Integer.toString(startingIndex) + "; size = " + Integer.toString(list.size())); } final EtmPoint point = PointFactory.getPoint(getClass(), "smoosh(int, List)"); try { endingIndex = startingIndex; final String firstLine = uncomment(list.get(startingIndex)).trim(); if (isDefinitionClose(firstLine)) { return firstLine; } final StringBuilder definitionBuilder = new StringBuilder(firstLine); boolean hasClose = false; int iterator = startingIndex + 1; for (final int size = list.size(); iterator < size; iterator++) { endingIndex = iterator; final String currentLine = uncomment(list.get(iterator)); hasClose = isDefinitionClose(currentLine); definitionBuilder.append(" ").append(currentLine.trim()); if (hasClose) { break; } } if (!hasClose) { throw new InvalidSubroutineException( "Unable to find close to subroutine definition: " + definitionBuilder.toString()); } return definitionBuilder.toString(); } finally { point.collect(); } }  @Override boolean canSmoosh(final String line); @Override int getEndingIndex(); @Override String smoosh(final int startingIndex, final List<String> list);  }### Answer:
@Test public void testSmooshNoClose() { final List<String> text = Collections.singletonList("subroutine incomplete_sub ("); InvalidSubroutineException e = assertThrows(InvalidSubroutineException.class, () -> { smoosher.smoosh(0, text); }); assertThat(e.getMessage()).isEqualTo("Unable to find close to subroutine definition: " + text.get(0)); }