add some missing tests for the security context

looked at code coverage and added some more testing.

what is really missing is an integration test that instantiates the bundle and makes sure the compiler passes work as expected and event subscribers actually trigger.