### Question:
AbstractSink implements Sink, Markup { protected static String unifyEOLs( String text ) { if ( text == null ) { return null; } int length = text.length(); StringBuilder buffer = new StringBuilder( length ); for ( int i = 0; i < length; i++ ) { if ( text.charAt( i ) == '\r' ) { if ( ( i + 1 ) < length && text.charAt( i + 1 ) == '\n' ) { i++; } buffer.append( EOL ); } else if ( text.charAt( i ) == '\n' ) { buffer.append( EOL ); } else { buffer.append( text.charAt( i ) ); } } return buffer.toString(); }  void enableLogging( Log log );  }### Answer:
@Test public void testUnifiedEOL() { String EOL = AbstractSink.EOL; String EOL_MACOS9 = "\r"; String EOL_UNIX = "\n"; String EOL_WIN = "\r\n"; assertEquals( "Hello " + EOL + " world", AbstractSink.unifyEOLs( "Hello " + EOL_MACOS9 + " world" ) ); assertEquals( "Hello " + EOL + " world", AbstractSink.unifyEOLs( "Hello " + EOL_UNIX + " world" ) ); assertEquals( "Hello " + EOL + " world", AbstractSink.unifyEOLs( "Hello " + EOL_WIN + " world" ) ); assertEquals( "Hello world" + EOL, AbstractSink.unifyEOLs( "Hello world" + EOL_MACOS9 ) ); assertEquals( "Hello world" + EOL, AbstractSink.unifyEOLs( "Hello world" + EOL_UNIX ) ); assertEquals( "Hello world" + EOL, AbstractSink.unifyEOLs( "Hello world" + EOL_WIN ) ); assertEquals( EOL + "Hello world", AbstractSink.unifyEOLs( EOL_MACOS9 + "Hello world" ) ); assertEquals( EOL + "Hello world", AbstractSink.unifyEOLs( EOL_UNIX + "Hello world" ) ); assertEquals( EOL + "Hello world", AbstractSink.unifyEOLs( EOL_WIN + "Hello world" ) ); }