### Question:
SubroutineDeclarationSmoosher implements IndexedSmoosher<String> { @Override public boolean canSmoosh(final String line) { if (line == null) { throw new IllegalArgumentException("Line cannot be null."); } final String normalized = line.trim().toUpperCase(Locale.US); if (!normalized.startsWith("DECLARE ")) { return false; } final int parenPos = line.indexOf('('); if (parenPos < 0) { return false; } if (line.indexOf('=') < parenPos) { return false; } return true; }  @Override boolean canSmoosh(final String line); @Override int getEndingIndex(); @Override String smoosh(final int startingIndex, final List<String> list);  }### Answer:
@Test public void testCanSmoosh() { assertThat(smoosher.canSmoosh("declare some_subroutine(arg1 = f8) = null")).isTrue(); }
@Test public void testCanSmooshNotDeclaration() { assertThat(smoosher.canSmoosh("subroutine some_sub(arg)")).isFalse(); }
@Test public void testCanSmooshVariableDeclaration() { assertThat(smoosher.canSmoosh("declare some_var = vc")).isFalse(); assertThat(smoosher.canSmoosh("declare some_other_var = i4 with protect, noconstant(0)")).isFalse(); }