added unittests for code coverage.