API Key tests

Adds testing of API Key authentication.