Adding unit test for credentials.clean