### Question:
HTTPDecoder { public String decode(final String value) { String result = value; if (value != null) { try { result = URLDecoder.decode(value, "UTF-8"); } catch (Exception e) { throw new PrettyException("Could not URLDecode value <" + value + ">", e); } } return result; }  String decode(final String value); String[] decode(final String[] values);  }### Answer:
@Test public void testDecodeValidInputReturnsDecodedInput() { String value = "foo+bar"; assertEquals("foo bar", decoder.decode(value)); }
@Test(expected = PrettyException.class) public void testDecodeInvalidInputThrowsException() { String value = "foo+bar%"; assertEquals("foo+bar%", decoder.decode(value)); }
@Test public void testDecodeNullProducesNull() { String value = null; assertEquals(null, decoder.decode(value)); }