Added tests using mock library.