Fixed expected error message in testRequired