public function testGetAddress() { $account = Account::reference('ACCOUNT_ID'); $response = $this->getMock(ResponseInterface::class); $expected = new Address(); $this->http->expects($this->any())->method('get')->with('/v2/accounts/ACCOUNT_ID/addresses/ADDRESS_ID', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->any())->method('toAddress')->with($response)->willReturn($expected); $actual = $this->client->getAccountAddress($account, 'ADDRESS_ID', ['foo' => 'bar']); $this->assertSame($expected, $actual); }