### Question:
BatchParserCommon { public static Line removeEndingCRLF(final Line line) { Pattern pattern = PATTERN_LAST_CRLF; Matcher matcher = pattern.matcher(line.toString()); if (matcher.matches()) { return new Line(matcher.group(1), line.getLineNumber()); } else { return line; } } private  BatchParserCommon(); static String trimLineListToLength(final List<Line> list, final int length); static String lineListToString(final List<Line> list); static InputStream convertToInputStream(final String contentType, final BatchQueryOperation operation,
                                                 final int contentLength); static Line removeEndingCRLF(final Line line); static Header consumeHeaders(final List<Line> remainingMessage); static void consumeBlankLine(final List<Line> remainingMessage, final boolean isStrict); static String getBoundary(final String contentType, final int line); static Map<String, List<String>> parseQueryParameter(final Line httpRequest); static final Pattern PATTERN_MULTIPART_MIXED; static final Pattern PATTERN_CONTENT_TYPE_APPLICATION_HTTP; static final Pattern PATTERN_RELATIVE_URI; }### Answer:
@Test public void testRemoveEndingCRLF() { String line = "Test\r\n"; assertEquals("Test", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveLastEndingCRLF() { String line = "Test\r\n\r\n"; assertEquals("Test\r\n", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveEndingCRLFWithWS() { String line = "Test\r\n "; assertEquals("Test", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveEndingCRLFNothingToRemove() { String line = "Hallo\r\nBla"; assertEquals("Hallo\r\nBla", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveEndingCRLFAll() { String line = "\r\n"; assertEquals("", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveEndingCRLFSpace() { String line = "\r\n "; assertEquals("", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveLastEndingCRLFWithWS() { String line = "Test \r\n"; assertEquals("Test ", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }
@Test public void testRemoveLastEndingCRLFWithWSLong() { String line = "Test \r\nTest2 \r\n"; assertEquals("Test \r\nTest2 ", BatchParserCommon.removeEndingCRLF(new Line(line,1)).toString()); }