public function testCommitSell() { $sell = Sell::reference('ACCOUNT_ID', 'SELL_ID'); $response = $this->getMock(ResponseInterface::class); $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/sells/SELL_ID/commit', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->once())->method('toSell')->with($response, $sell); $this->client->commitSell($sell, ['foo' => 'bar']); }