Use non-deprecated assertion in test