Added a new test for defrag().
Added tests for Term.