public function testApiResolveOrReject_ExpiresResponse()
{
$obj = $this->createResponseRecordStorage();
$pid = 'pid';
$alias = 'alias';
$rep = new ResponseRecord($pid, $alias);
$ex = new Exception();
$this->callProtectedMethod($obj, 'addResponse', [$pid, $rep]);
$this->assertSame(['pid' => $rep], $this->getProtectedProperty($obj, 'reps'));
$this->assertFalse(array_key_exists('pid', $this->getProtectedProperty($obj, 'handledReps')));
$this->callProtectedMethod($obj, 'resolveOrRejectResponse', [$pid, $ex]);
$this->assertSame([], $this->getProtectedProperty($obj, 'reps'));
$this->assertTrue(array_key_exists('pid', $this->getProtectedProperty($obj, 'handledReps')));
}