Refactored tests. Added one test case.