/**
* @inheritdoc
*/
public function is($category, $document)
{
if ($this->dataSource->hasCategory($category)) {
return $this->classify($document) === $category;
} else {
throw new RuntimeException(sprintf("The category '%s' doesn't exist", $category));
}
}