CAS-1348: Refactored the way tests check for returned authentication.