public static function getOptions($userSpecified, $defaults)
    {
        $options = static::getAnyOptions($userSpecified, $defaults);

        foreach ($options as $key => $null) {
            if (array_key_exists($key, $defaults)) {
                continue;
            }
            throw new \InvalidArgumentException("Unknown parameter (" . $key . ")");
        }

        return $options;
    }