TextWrapperCreator { boolean isBlankLineOrLines(Text content) { if (!keepBlankLines) { return false; } return content.getText().matches("^\\s*?(\\r|\\n)\\s*$"); }  void setup(PluginParameters pluginParameters);  }
@Test void testIsEmptyLine() { assertFalse(textWrapperCreator.isBlankLineOrLines(new Text("\n sortpom\n "))); assertFalse(textWrapperCreator.isBlankLineOrLines(new Text("sortpom"))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text("\n "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \n "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \n\n "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text("\n\n"))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \r "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \r\r "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text("\r\r"))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \r\n "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text(" \r\n\r\n "))); assertTrue(textWrapperCreator.isBlankLineOrLines(new Text("\r\n\r\n"))); assertFalse(textWrapperCreator.isBlankLineOrLines(new Text(" "))); }