public static function fromRaw(array $raw)
    {
        $last = $raw[count($raw) - 2];
        if (strncmp($last, 'ACK', 3) === 0) {
            return self::produceFailResponse($last);
        }
        array_pop($raw);
        array_pop($raw);
        return new self($raw);
    }