Test to check that key list works correctly