public function testUpdateBatch()
{
$mockBatchRequest = $this->getMockBuilder(BatchRequest::class)->setMethods(["createRequestXml"])->disableOriginalConstructor()->getMock();
$mockBatchRequest->expects($this->once())->method("createRequestXml")->will($this->returnValue("<batch/>"));
$mockCellFeed = $this->getMockBuilder(CellFeed::class)->setMethods(["getBatchUrl"])->disableOriginalConstructor()->getMock();
$mockCellFeed->expects($this->once())->method("getBatchUrl")->will($this->returnValue("https://spreadsheets.google.com/"));
$mockServiceRequest = $this->getMockBuilder(DefaultServiceRequest::class)->setMethods(array("post"))->disableOriginalConstructor()->getMock();
$mockServiceRequest->expects($this->once())->method("post")->with($this->equalTo("https://spreadsheets.google.com/"), $this->stringContains("<batch/>"))->will($this->returnValue("<response/>"));
ServiceRequestFactory::setInstance($mockServiceRequest);
$this->assertTrue($mockCellFeed->updateBatch($mockBatchRequest) instanceof BatchResponse);
}