Added unit test.
Simplified test.