public function theJsonNodeShouldExist($name) { $json = $this->getJson(); try { $node = $this->inspector->evaluate($json, $name); } catch (\Exception $e) { throw new \Exception("The node '{$name}' does not exist."); } return $node; }