Updated setCredentials and added the UT for SetCredentialStore