Fix SecurityTokenManagerTest and build failure on test failure