added tests for KeyStorage (also Integration Tests since Keystorage uses everything)