public function testPurgeResult()
{
$requestBag = new RequestBag();
// populate request bag and point the cache key creation to the mocked class
$requestBag->setApi('CacheTest')->setMethodData(['cache' => ['ttl' => 100]])->setClassInstance(new MockCacheTestApiClass())->setClassData(['cacheKeyInterface' => true]);
\Webiny\Component\Rest\Response\Cache::saveResult($requestBag, 'my result');
$result = \Webiny\Component\Rest\Response\Cache::getFromCache($requestBag);
$this->assertSame('my result', $result);
\Webiny\Component\Rest\Response\Cache::purgeResult($requestBag);
$result = \Webiny\Component\Rest\Response\Cache::getFromCache($requestBag);
$this->assertFalse($result);
}