private function validateValue($value, array $constraints, ValidatorInterface $validator)
    {
        $violations = $validator->validate($value, $constraints);

        if (count($violations) > 0) {
            throw new JsonRpc\Exception\Argument();
        }
    }