  @Test(expected = IllegalArgumentException.class)
  public void testUnicodeCodePoint2PercentHexStringOnInvalidCodePoint() {

    // From "Invalid code points" section of the UTF-8 Wikipedia article
    // (http://en.wikipedia.org/wiki/UTF-8#Invalid_code_points):

    // According to the UTF-8 definition (RFC 3629) the high and low
    // surrogate halves used by UTF-16 (U+D800 through U+DFFF) are not
    // legal Unicode values, and their UTF-8 encoding should be treated
    // as an invalid byte sequence.
    //
    // Whether an actual application should do this is debatable, as it
    // makes it impossible to store invalid UTF-16 (that is, UTF-16 with
    // unpaired surrogate halves) in a UTF-8 string. This is necessary to
    // store unchecked UTF-16 such as Windows filenames as UTF-8. It is
    // also incompatible with CESU encoding (described below).

    // U+D800 (decimal code point: 55296) - a UTF-16 surrogate (U+D800 - U+DFFF)
    // Not a valid unicode code point. Expect an IllegalArgumentException
    StringValidateEncodeUtils.unicodeCodePoint2PercentHexString(55296, "UTF-8");
    // try {
    // assertNotNull( StringValidateEncodeUtils.unicodeCodePoint2PercentHexString( 55296, "UTF-8" ) );
    // } catch ( IllegalArgumentException e ) {
    // return;
    // }
    // fail( "Didn't catch invalid Unicode code point [55296].");

  }