Add unit test for each functions so that we will not brake the functions in accident.
Add unit test for each functions so that we will not brake the functions in accident.