public function createMyNode($type, $title)
    {
        if ($this->getUserManager()->currentUserIsAnonymous()) {
            throw new \Exception(sprintf('There is no current logged in user to create a node for.'));
        }

        $node = (object) array(
        'title' => $title,
        'type' => $type,
        'body' => $this->getRandom()->name(255),
        'uid' => $this->getUserManager()->getCurrentUser()->uid,
        );
        $saved = $this->nodeCreate($node);

        // Set internal page on the new node.
        $this->getSession()->visit($this->locatePath('/node/' . $saved->nid));
    }