KeyStorage test, to be further modified