Re-wrote unit test cases