Add exception checking in recently added test