Convert api key test to spec style