### Question:
Arguments { public static String wrapText( final String text, final int lineLength ) { List<String> lines = Arrays.asList( text.split( "\r?\n" ) ); return lines.stream() .map( l -> l.length() > lineLength ? WordUtils.wrap( l, lineLength ) : l ) .collect( Collectors.joining( NEWLINE ) ); } Arguments(); Arguments withDatabase(); Arguments withDatabase( String description ); Arguments withAdditionalConfig(); Arguments withTo( String description ); Arguments withOptionalPositionalArgument( int position, String value ); Arguments withMandatoryPositionalArgument( int position, String value ); Arguments withArgument( NamedArgument namedArgument ); Arguments withPositionalArgument( PositionalArgument arg ); String usage(); String description( String text ); static String wrapText( final String text, final int lineLength ); String formatArgumentDescription( final int longestAlignmentLength, final NamedArgument argument ); static String rightColumnFormatted( final String leftText, final String rightText, int rightAlignIndex ); Arguments parse( String[] args ); String get( int pos ); String get( String argName ); boolean getBoolean( String argName ); Optional<Path> getOptionalPath( String argName ); Path getMandatoryPath( String argName ); T get( String argName, Function<String,T> converter ); boolean has( String argName ); static final Arguments NO_ARGS; }### Answer:
@Test void wrappingHandlesBothKindsOfLineEndingsAndOutputsPlatformDependentOnes() { assertEquals( String.format( "One with Linux%n" + "One with Windows%n" + "And one which is%n" + "just long and should%n" + "be wrapped by the%n" + "function" ), Arguments.wrapText( "One with Linux\n" + "One with Windows\r\n" + "And one which is just long and should be wrapped by the function", 20 ) ); }