Add test for keys functionality