### Question:
URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder { public static final byte[] decodeUrl(final byte[] bytes) throws DecoderException { if (bytes == null) { return null; } final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); for (int i = 0; i < bytes.length; i++) { final int b = bytes[i]; if (b == '+') { buffer.write(' '); } else if (b == ESCAPE_CHAR) { try { final int u = Utils.digit16(bytes[++i]); final int l = Utils.digit16(bytes[++i]); buffer.write((char) ((u << 4) + l)); } catch (final ArrayIndexOutOfBoundsException e) { throw new DecoderException("Invalid URL encoding: ", e); } } else { buffer.write(b); } } return buffer.toByteArray(); } URLCodec();  URLCodec(final String charset); static final byte[] encodeUrl(BitSet urlsafe, final byte[] bytes); static final byte[] decodeUrl(final byte[] bytes); @Override byte[] encode(final byte[] bytes); @Override byte[] decode(final byte[] bytes); String encode(final String str, final String charset); @Override String encode(final String str); String decode(final String str, final String charset); @Override String decode(final String str); @Override Object encode(final Object obj); @Override Object decode(final Object obj); String getDefaultCharset(); @Deprecated String getEncoding();  }### Answer:
@Test public void testDecodeWithNullArray() throws Exception { final byte[] plain = null; final byte[] result = URLCodec.decodeUrl( plain ); assertEquals("Result should be null", null, result); }