@Test
public void testWrap_StringInt() {

    assertNull(Wrap.wrap(null, 20));
    assertNull(Wrap.wrap(null, -1));
    assertEquals("", Wrap.wrap("", 20));
    assertEquals("", Wrap.wrap("", -1));
    // normal
    final String systemNewLine = System.lineSeparator();
    String input = "Here is one line of text that is going to be wrapped after 20 columns.";
    String expected = "Here is one line of" + systemNewLine + "text that is going"
            + systemNewLine + "to be wrapped after" + systemNewLine + "20 columns.";
    assertEquals(expected, Wrap.wrap(input, 20));
    // long word at end
    input = "Click here to jump to the commons website - https://commons.apache.org";
    expected = "Click here to jump" + systemNewLine + "to the commons" + systemNewLine
            + "website -" + systemNewLine + "https://commons.apache.org";
    assertEquals(expected, Wrap.wrap(input, 20));
    // long word in middle
    input = "Click here, https://commons.apache.org, to jump to the commons website";
    expected = "Click here," + systemNewLine + "https://commons.apache.org," + systemNewLine
            + "to jump to the" + systemNewLine + "commons website";
    assertEquals(expected, Wrap.wrap(input, 20));
    // leading spaces on a new line are stripped
    // trailing spaces are not stripped
    input = "word1             word2                        word3";
    expected = "word1  " + systemNewLine + "word2  " + systemNewLine + "word3";
    assertEquals(expected, Wrap.wrap(input, 7));
}