### Question:
ManifestUtils { public final static String encode(String s) { s = s.replaceAll("\r\n", EOL_TOKEN); return s.replaceAll("\n", EOL_TOKEN); } private  ManifestUtils(); final static Map<String, Map<String,String>> normalize(Manifest m); final static Map<String,String> normalize(Attributes att); final static String encode(String s); static Map<String,String> getMain(Map<String, Map<String,String>> exManifest); static String decode(String s); static final String EOL_TOKEN; static final String MAIN_ATTS; static final String EOL; }### Answer:
@Test public void encode() { String noLinefeed = "abc"; String linefeed = "abc\ndef"; String dosfeed = "abc\r\ndef"; String s1 = ManifestUtils.encode(noLinefeed); String s2 = ManifestUtils.encode(linefeed); String s3 = ManifestUtils.encode(dosfeed); String desired = "abc" + ManifestUtils.EOL_TOKEN + "def"; assertEquals(noLinefeed, s1); assertFalse(linefeed.equals(s2)); assertFalse(dosfeed.equals(s3)); assertEquals(s2, desired); assertEquals(s3, desired); }