implement result checking in tests