public virtual void TestResize()
 {
     CharTermAttribute t = new CharTermAttribute();
     char[] content = "hello".ToCharArray();
     t.CopyBuffer(content, 0, content.Length);
     for (int i = 0; i < 2000; i++)
     {
         t.ResizeBuffer(i);
         Assert.IsTrue(i <= t.Buffer.Length);
         Assert.AreEqual("hello", t.ToString());
     }
 }