@Test(dataProvider = "removeSpacesDP") public void removeSpaces(String input, String expectedOutput) { LeadingWhitespaceRemover lwr = new LeadingWhitespaceRemover(); assertEquals(lwr.removeSpaces(input), expectedOutput); }
@Override public String removeSpaces(String input) { return input .replaceAll("(?m)^[\\s\\t]+|\\n|\\r", "") .replaceAll("\\$whitespace\\$", " ") .replaceAll("\\$newline\\$", "\n"); }
LeadingWhitespaceRemover implements SpaceRemover { @Override public String removeSpaces(String input) { return input .replaceAll("(?m)^[\\s\\t]+|\\n|\\r", "") .replaceAll("\\$whitespace\\$", " ") .replaceAll("\\$newline\\$", "\n"); } }
LeadingWhitespaceRemover implements SpaceRemover { @Override public String removeSpaces(String input) { return input .replaceAll("(?m)^[\\s\\t]+|\\n|\\r", "") .replaceAll("\\$whitespace\\$", " ") .replaceAll("\\$newline\\$", "\n"); }  }
LeadingWhitespaceRemover implements SpaceRemover { @Override public String removeSpaces(String input) { return input .replaceAll("(?m)^[\\s\\t]+|\\n|\\r", "") .replaceAll("\\$whitespace\\$", " ") .replaceAll("\\$newline\\$", "\n"); }  @Override String removeSpaces(String input); }
LeadingWhitespaceRemover implements SpaceRemover { @Override public String removeSpaces(String input) { return input .replaceAll("(?m)^[\\s\\t]+|\\n|\\r", "") .replaceAll("\\$whitespace\\$", " ") .replaceAll("\\$newline\\$", "\n"); }  @Override String removeSpaces(String input);  }