Added test for the authenticate() method.