ModelUtils { public static String urldecode(String string) { try { return URLDecoder.decode(string, "UTF-8"); } catch (UnsupportedEncodingException | NullPointerException e) { throw new IllegalStateException("UTF-8 not supported."); } }  static String urlencode(String format, String... args); static String urldecode(String string);  }
@Test(expectedExceptions = IllegalStateException.class) public void simpleDecoderNullPointer() { ModelUtils.urldecode(null); }