wrap tests in handleexception