Added test cases and tested method tagIt().