Test for key storage code