Adding pre-commit hook for running tests.
Added tests for CA and secure clients.