Unit tests for the security infrastructure classes.

Issue: BMS-33
Reviewer: RebeccaB