added asserts to unit test