@Test public void test120() throws Exception { final String justified = Justify.wrapAndJustify(source, 120); final String expected = "" + "There are two different ways for rsync to contact a remote system: using a remote-shell program as the transport (such\n" + "as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or\n" + "destination path contains a single colon (:) separator after a host specification. Contacting an rsync daemon directly\n" + "happens when the source or destination path contains a double colon (::) separator after a host specification, OR when\n" + "an rsync: "exception to this latter rule)."; Assert.assertEquals(expected, justified); }
public static String wrapAndJustify(final String text, final int width) { final Justify justify = new Justify(width); return justify.wrapAndJustify(text); }
Justify { public static String wrapAndJustify(final String text, final int width) { final Justify justify = new Justify(width); return justify.wrapAndJustify(text); } }
Justify { public static String wrapAndJustify(final String text, final int width) { final Justify justify = new Justify(width); return justify.wrapAndJustify(text); } Justify(final int width); }
Justify { public static String wrapAndJustify(final String text, final int width) { final Justify justify = new Justify(width); return justify.wrapAndJustify(text); } Justify(final int width); static String wrapAndJustify(final String text, final int width); }
Justify { public static String wrapAndJustify(final String text, final int width) { final Justify justify = new Justify(width); return justify.wrapAndJustify(text); } Justify(final int width); static String wrapAndJustify(final String text, final int width);  }