public function testApiRejectRequest_RejectsRequest()
{
$obj = $this->createRequestRecordStorage();
$pid = 'pid';
$exp = new Exception('message');
$callable = $this->createCallableMock();
$callable->expects($this->once())->method('__invoke')->with($exp);
$req = new RequestRecord($pid, null, $callable);
$this->callProtectedMethod($obj, 'addRequest', [$pid, $req]);
$this->callProtectedMethod($obj, 'rejectRequest', [$pid, $exp]);
}