If I have some class:
class ServiceClient {
setVaultClient(vaultClient) {
this.vaultClientObj = vaultClient;
}
}
and I want to mock the result of this method (means I want this.vaultClientObj to be what I say, but not the real one) - how can I do that? I am trying with stub.returnsThis() and I wonder if I can put some specific value - not just to be returned this, but to be returned this.vaultClientObj value that i want.