public function assertContent(PyStringNode $string) {
    $values = $this->getYamlParser()->parse($string);
    $message = __METHOD__ . ": Required fields 'type', 'title' and 'langcode' not found.";
    Assert::keyExists($values, 'type', $message);
    Assert::keyExists($values, 'title', $message);
    Assert::keyExists($values, 'langcode', $message);
    $node = $this->getCore()->entityCreate('node', $values);
    $this->nodes[] = $node;
  }