[Security] Removed an unnecessary call to sprintf() and added a test case.
[Security] Added a test to the BasicAuthenticationListener.
[Security] Added tests for the ContextListener.
[Security] Added tests for the SwitchUserListener.
[Security] Added few new test cases for the HttpUtils and improved readability of existing tests.