public void testBadCharsetEncode() {
    ex.overrideCharsetSet("Some Crap");
    try {
      ex.decodeString("Woo!".getBytes());
      fail("Expected runtime exception");
    } catch (RuntimeException e) {
      assertSame(UnsupportedEncodingException.class, e.getCause().getClass());
    }
  }
Base tests of the base serializing transcoder stuff.
src/test/java/net/spy/memcached/transcoders/BaseSerializingTranscoderTest.java