public void PASS_Create()
        {
            UaxEmailUrlTokenizer token = new UaxEmailUrlTokenizer("name")
            {
                MaximumTokenLength = 31
            };

            Assert.IsNotNull(token);
            Assert.AreEqual("name", token.Name);
            Assert.AreEqual((int)31, token.MaximumTokenLength);
        }
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            Dictionary<string, object> tokenDict = serializer.Deserialize<Dictionary<string, object>>(reader);
            Dictionary<string, object> fieldDict = JsonConvert.DeserializeObject<Dictionary<string, object>>(tokenDict.First().Value.ToString());

            UaxEmailUrlTokenizer token = new UaxEmailUrlTokenizer(tokenDict.First().Key);
            TokenizerBase.Deserialize(token, fieldDict);
            token.MaximumTokenLength = fieldDict.GetInt64(_MAXIMUM_TOKEN_LENGTH, UaxEmailUrlTokenizer._MAXIMUM_TOKEN_LENGTH_DEFAULT);

            return token;
        }
        public void PASS_Serialize()
        {
            UaxEmailUrlTokenizer token = new UaxEmailUrlTokenizer("name")
            {
                MaximumTokenLength = 31
            };

            string json = JsonConvert.SerializeObject(token);
            Assert.IsNotNull(json);

            string expectedJson = "{\"name\":{\"type\":\"uax_url_email\",\"max_token_length\":31}}";
            Assert.AreEqual(expectedJson, json);
        }