Added some unit tests to security provider.