Reusing isFail logic from testSession, refactoring into sessionUtil class