### Question:
BaseController { protected String validateResponseSplitting(String value) { try { return RESPONSE_SPLITTING_PATTERN.matcher(URLDecoder.decode(value, "UTF8")).replaceAll(""); } catch (UnsupportedEncodingException e) { throw new InternalServerException("Error while validating for HTTP response splitting!", e); } }  String getExternalUrl(); void setExternalUrl(String externalUrl); String createCollectionUrl(String collectionName); @ExceptionHandler(value = { BadRequestException.class, BadQueryParameterException.class }) void handle400(Exception e, HttpServletRequest request, HttpServletResponse response); @ExceptionHandler(value = ResourceNotFoundException.class) void handle404(Exception e, HttpServletRequest request, HttpServletResponse response); @ExceptionHandler(value = InternalServerException.class) void handle500(Exception e, HttpServletRequest request, HttpServletResponse response); @ExceptionHandler(value = { RuntimeException.class, Exception.class, Throwable.class }) void handleException(Exception e, HttpServletRequest request, HttpServletResponse response);  }### Answer:
@Test public void when_crUrlEncoded() { String value = "test%0ddfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_lfUrlEncoded() { String value = "test%0adfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_crAndLfUrlEncodedUpperCase() { String value = "test%0D%0Adfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_crUrlEncodedUpperCase() { String value = "test%0Ddfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_lfUrlEncodedUpperCase() { String value = "test%0Adfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_notCrAndLf() { String value = "testdfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_crAndLf() { String value = "test\r\ndfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_cr() { String value = "test\rdfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_lf() { String value = "test\ndfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }
@Test public void when_crAndLfUrlEncoded() { String value = "test%0d%0adfjdsjg"; String validated = controller.validateResponseSplitting(value); assertEquals(EXPECTED_VALUE, validated); }