Added assertions for the unit test.