public function testGetWithdrawal() { $account = Account::reference('ACCOUNT_ID'); $expected = new Withdrawal(); $response = $this->getMock(ResponseInterface::class); $this->http->expects($this->any())->method('get')->with('/v2/accounts/ACCOUNT_ID/withdrawals/WITHDRAWAL_ID', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->any())->method('toWithdrawal')->with($response)->willReturn($expected); $actual = $this->client->getAccountWithdrawal($account, 'WITHDRAWAL_ID', ['foo' => 'bar']); $this->assertSame($expected, $actual); }