### Question:
ManifestUtils { public static final String encode(String input) { if (nonNull(input)) { input = input.replaceAll("\r\n", EOL_TOKEN); input = input.replaceAll("\r", EOL_TOKEN); input = input.replaceAll("\n", EOL_TOKEN); } return input; } private  ManifestUtils(); static final Map<String, Map<String,String>> normalize(Manifest m); static final Map<String,String> normalize(Attributes att); static final String encode(String input); static Map<String,String> getMain(Map<String, Map<String,String>> exManifest); static String decode(String input); 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); }