@Test
  public void shouldValidateBinaryKey() {
    StringUtils.validateKey("mykey1234", true);
    StringUtils.validateKey("key baz", true);
    StringUtils.validateKey("keybaz\n", true);
    StringUtils.validateKey("keybaz\r", true);
    StringUtils.validateKey("keybaz\0", true);
  }
A dummy key which is longer than allowed.
src/test/java/net/spy/memcached/util/StringUtilsTest.java