Missing tests for `setBasicAuth` method

Implementation of functionality discussed in #401.