Credentials end up existing in prod because the person used Mochito and didn’t override the function for providing credentials :’c
Mockito shouldn't change whether or not this is possible; the code shouldn't have the prod creds (or any external resource references) hard coded in the compiled bytecode.