public function testFindByName() { $Model = new Model(json_decode($this->getMockData())); $Model->setName('test'); $this->mockGetListResponse(200, $Model); $API = new API(); $Model = $API->findByName('test'); $this->assertInstanceOf(Model::class, $Model); $this->assertEquals('test', $Model->getName()); }