Add tests for lib/security