refactored assertions and added expectations on unit test framework