Added a fix for the test that checks for a refresh token value.
Added a fix when getting a null pointer exception.