Replaced true asserations with instanceOf asserations in test cases