edit method's unit test for appearcounter

add more method's unit test for appearcounter, and build more method
unit test needed complete the code
complete the infrequent word getter method