unit tests for apikey and simplifications