Added assert in test cases

Added required assert in test cases to make it more robust.