unit testing oauth token endpoint