Added more test cases, and added more mocks