public function testCallingNamespaceMethod()
{
$this->client->expects($this->at(0))->method('call')->with('namespace.method', array('arg1', 'arg2'))->will($this->returnValue('namespace method return'));
$this->client->expects($this->at(1))->method('call')->with('namespace.another_namespace.method', array('arg1', 'arg2'))->will($this->returnValue('another namespace method return first'));
$this->client->expects($this->at(2))->method('call')->with('namespace.another_namespace.method', array('arg1', 'arg2'))->will($this->returnValue('another namespace method return second'));
$this->assertSame('namespace method return', $this->proxy->namespace->method('arg1', 'arg2'));
$this->assertSame('another namespace method return first', $this->proxy->namespace->another_namespace->method('arg1', 'arg2'));
$this->assertSame('another namespace method return second', $this->proxy->{"namespace.another_namespace.method"}('arg1', 'arg2'));
}