package soapcalls

import (
	"testing"
)

func TestParseProtocolInfo(t *testing.T) {
	tt := []struct {
		name      string
		input     []byte
		mediaType string
	}{
		{
			`parseProtocolInfo Test #1`,
			[]byte(`<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>\n<u:GetProtocolInfoResponse xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1">\r\n<Source></Source>\r\n<Sink>http-get:*:raw/x-pcap:*,http-get:*:application/x-dtls:*,http-get:*:application/ttml+xml:*,http-get:*:subpicture/x-pgs:*,http-get:*:application/sdp:*,http-get:*:application/x-hls:*,http-get:*:audio/x-stm:*,http-get:*:audio/x-s3m:*,http-get:*:audio/x-it:*,http-get:*:audio/x-xm:*,http-get:*:video/x-cdxa:*,http-get:*:audio/x-vgm:*,http-get:*:audio/x-spc:*,http-get:*:audio/x-sap:*,http-get:*:audio/x-nsf:*,http-get:*:audio/x-kss:*,http-get:*:audio/x-hes:*,http-get:*:audio/x-gym:*,http-get:*:audio/x-gbs:*,http-get:*:audio/x-ay:*,http-get:*:video/x-unaligned-raw:*,http-get:*:audio/x-unaligned-raw:*,http-get:*:audio/x-mod:*,http-get:*:audio/x-sid:*,http-get:*:application/x-teletext:*,http-get:*:subpicture/x-dvb:*,http-get:*:application/x-gdp:*,http-get:*:application/x-rdt:*,http-get:*:application/x-pn-realaudio:*,http-get:*:application/vnd.rn-realmedia:*,http-get:*:image/x-exr:*,http-get:*:video/x-ms-asf:*,http-get:*:application/x-yuv4mpeg:*,http-get:*:application/x-gst-av-wsvqa:*,http-get:*:application/x-gst-av-wsaud:*,http-get:*:application/x-gst-av-wc3movie:*,http-get:*:application/x-gst-av-vmd:*,http-get:*:audio/x-ttafile:*,http-get:*:application/x-gst-av-psxstr:*,http-get:*:application/x-gst-av-sol:*,http-get:*:application/x-gst-av-smk:*,http-get:*:application/x-gst-av-film_cpk:*,http-get:*:video/x-pva:*,http-get:*:application/x-gst-av-nuv:*,http-get:*:application/x-gst-av-nut:*,http-get:*:video/x-nsv:*,http-get:*:application/mxf:*,http-get:*:audio/x-musepack:*,http-get:*:application/x-gst-av-mmf:*,http-get:*:application/x-gst-av-mm:*,http-get:*:video/x-ivf:*,http-get:*:application/x-gst-av-ipmovie:*,http-get:*:application/x-gst-av-idcin:*,http-get:*:application/gxf:*,http-get:*:image/gif:*,http-get:*:application/x-gst-av-ffm:*,http-get:*:application/x-gst-av-ea:*,http-get:*:application/x-gst-av-daud:*,http-get:*:audio/x-brstm:*,http-get:*:audio/x-bfstm:*,http-get:*:application/x-gst-av-avs:*,http-get:*:application/x-ape:*,http-get:*:audio/aiff:*,http-get:*:audio/x-aiff:*,http-get:*:video/x-zmbv:*,http-get:*:video/x-gst-av-xl:*,http-get:*:video/x-xan:*,http-get:*:video/x-gst-av-wnv1:*,http-get:*:video/x-gst-av-vqavideo:*,http-get:*:video/x-vp6:*,http-get:*:video/x-vp5:*,http-get:*:video/x-vp3:*,http-get:*:video/x-vmnc:*,http-get:*:video/x-gst-av-vmdvideo:*,http-get:*:video/x-ati-vcr:*,http-get:*:video/x-ultimotion:*,http-get:*:video/x-tscc:*,http-get:*:video/x-camtasia:*,http-get:*:video/x-truemotion:*,http-get:*:video/sp5x:*,http-get:*:video/x-smc:*,http-get:*:image/x-sgi:*,http-get:*:video/x-apple-video:*,http-get:*:video/x-gst-av-roqvideo:*,http-get:*:video/x-gst-av-qpeg:*,http-get:*:video/x-qdrw:*,http-get:*:image/ppm:*,http-get:*:video/x-gst-av-pgmyuv:*,http-get:*:image/pbm:*,http-get:*:video/x-nuv:*,http-get:*:video/x-mszh:*,http-get:*:video/x-msvideocodec:*,http-get:*:video/x-rle:*,http-get:*:video/x-gst-av-mmvideo:*,http-get:*:video/x-mjpeg-b:*,http-get:*:video/x-mimic:*,http-get:*:video/x-gst-av-mdec:*,http-get:*:video/x-loco:*,http-get:*:video/x-lagarith:*,http-get:*:video/x-kmvc:*,http-get:*:image/jp2:*,http-get:*:video/x-gst-av-interplayvideo:*,http-get:*:video/x-indeo:*,http-get:*:video/x-gst-av-idcinvideo:*,http-get:*:video/x-intel-h263:*,http-get:*:image/gst-libav-gif:*,http-get:*:video/x-fraps:*,http-get:*:video/x-4xm:*,http-get:*:video/x-gst-av-flic:*,http-get:*:video/x-flash-screen2:*,http-get:*:video/x-gst-av-ffvhuff:*,http-get:*:video/x-ffv:*,http-get:*:video/x-gst-av-8bps:*,http-get:*:video/x-dnxhd:*,http-get:*:video/x-compressed-yuv:*,http-get:*:video/x-camstudio:*,http-get:*:video/x-cirrus-logic-accupak:*,http-get:*:video/x-cinepak:*,http-get:*:video/x-cavs:*,http-get:*:video/x-gst-av-avs:*,http-get:*:video/x-asus:*,http-get:*:video/x-amv:*,http-get:*:video/x-apple-intermediate-codec:*,http-get:*:video/x-aasc:*,http-get:*:audio/x-dpcm:*,http-get:*:audio/x-gst-av-ws_snd1:*,http-get:*:audio/x-wms:*,http-get:*:audio/x-gst-av-vmdaudio:*,http-get:*:audio/x-twin-vq:*,http-get:*:audio/x-truespeech:*,http-get:*:audio/x-true-hd:*,http-get:*:audio/x-sipro:*,http-get:*:audio/x-shorten:*,http-get:*:audio/x-qdm2:*,http-get:*:audio/qcelp:*,http-get:*:audio/x-ffmpeg-parsed-musepack:*,http-get:*:audio/x-gst-av-mp3on4:*,http-get:*:audio/x-gst-av-mp3adu:*,http-get:*:audio/x-mlp:*,http-get:*:audio/x-voxware:*,http-get:*:audio/x-mace:*,http-get:*:audio/x-imc:*,http-get:*:audio/x-vnd.sony.atrac3:*,http-get:*:audio/x-vnd.sony.atrac1:*,http-get:*:audio/x-ffmpeg-parsed-ape:*,http-get:*:audio/x-smpte-302m:*,http-get:*:audio/x-dv:*,http-get:*:unknown/unknown:*,http-get:*:audio/x-xi:*,http-get:*:audio/x-w64:*,http-get:*:audio/x-voc:*,http-get:*:audio/x-svx:*,http-get:*:audio/x-sds:*,http-get:*:audio/x-rf64:*,http-get:*:audio/x-paris:*,http-get:*:audio/x-nist:*,http-get:*:audio/x-ircam:*,http-get:*:application/vnd.ms-sstr+xml:*,http-get:*:application/x-ogg-avi:*,http-get:*:application/x-ogm-text:*,http-get:*:application/x-kate:*,http-get:*:text/x-cmml:*,http-get:*:application/x-ogm-audio:*,http-get:*:video/x-daala:*,http-get:*:video/x-smoke:*,http-get:*:application/x-ogm-video:*,http-get:*:application/kate:*,http-get:*:image/webp:*,http-get:*:audio/x-lpcm:*,http-get:*:audio/x-private-ts-lpcm:*,http-get:*:audio/x-private2-lpcm:*,http-get:*:audio/x-private1-lpcm:*,http-get:*:text/plain:*,http-get:*:application/dash+xml:*,http-get:*:audio/ms-gsm:*,http-get:*:application/x-subtitle-vtt:*,http-get:*:application/x-subtitle-lrc:*,http-get:*:application/x-subtitle-qttext:*,http-get:*:application/x-subtitle-dks:*,http-get:*:application/x-subtitle-mpl2:*,http-get:*:application/x-subtitle-tmplayer:*,http-get:*:application/x-subtitle-sami:*,http-get:*:application/x-subtitle:*,http-get:*:audio/x-midi-event:*,http-get:*:application/octet-stream:*,http-get:*:audio/riff-midi:*,http-get:*:audio/midi:*,http-get:*:application/x-bzip:*,http-get:*:multipart/x-mixed-replace:*,http-get:*:application/x-apetag:*,http-get:*:audio/x-wav:*,http-get:*:application/x-id3:*,http-get:*:audio/x-wavpack:*,http-get:*:audio/x-private1-dts:*,http-get:*:audio/x-private1-ac3:*,http-get:*:audio/x-amr-wb-sh:*,http-get:*:audio/x-amr-nb-sh:*,http-get:*:audio/x-nellymoser:*,http-get:*:video/x-vp6-alpha:*,http-get:*:video/x-vp6-flash:*,http-get:*:video/x-flash-screen:*,http-get:*:video/x-flash-video:*,http-get:*:video/x-flv:*,http-get:*:application/x-subtitle-avi:*,http-get:*:video/x-msvideo:*,http-get:*:video/x-av1:*,http-get:*:application/x-subtitle-unknown:*,http-get:*:subpicture/x-dvd:*,http-get:*:application/x-usf:*,http-get:*:application/x-ass:*,http-get:*:application/x-ssa:*,http-get:*:subtitle/x-kate:*,http-get:*:audio/x-wma:*,http-get:*:audio/x-pn-realaudio:*,http-get:*:audio/x-tta:*,http-get:*:video/x-pn-realvideo:*,http-get:*:video/x-msmpeg:*,http-get:*:video/x-huffyuv:*,http-get:*:video/x-matroska-3d:*,http-get:*:video/x-matroska:*,http-get:*:audio/x-matroska:*,http-get:*:video/x-fli:*,http-get:*:audio/x-dts:*,http-get:*:audio/x-eac3:*,http-get:*:audio/webm:*,http-get:*:video/webm:*,http-get:*:video/ogg:*,http-get:*:audio/ogg:*,http-get:*:application/ogg:*,http-get:*:image/svg+xml:*,http-get:*:image/svg:*,http-get:*:image/x-pcx:*,http-get:*:image/x-tga:*,http-get:*:image/x-bitmap:*,http-get:*:image/vnd.wap.wbmp:*,http-get:*:image/x-MS-bmp:*,http-get:*:image/x-bmp:*,http-get:*:image/bmp:*,http-get:*:image/x-portable-pixmap:*,http-get:*:image/x-portable-graymap:*,http-get:*:image/x-portable-bitmap:*,http-get:*:image/x-portable-anymap:*,http-get:*:image/tiff:*,http-get:*:image/x-pixmap:*,http-get:*:image/x-sun-raster:*,http-get:*:image/x-cmu-raster:*,http-get:*:application/x-navi-animation:*,http-get:*:image/x-icon:*,http-get:*:image/x-j2c:*,http-get:*:video/x-mp4-part:*,http-get:*:text/x-raw:*,http-get:*:video/x-qt-part:*,http-get:*:video/x-dirac:*,http-get:*:image/png:*,http-get:*:video/x-svq:*,http-get:*:video/x-cineform:*,http-get:*:video/x-prores:*,http-get:*:audio/alac:*,http-get:*:audio/x-alac:*,http-get:*:application/x-3gp:*,http-get:*:audio/mp4:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:video/mj2:*,http-get:*:video/quicktime:*,http-get:*:audio/x-au:*,http-get:*:audio/x-flac:*,http-get:*:application/x-srtcp-stream:*,http-get:*:application/x-srtp-stream:*,http-get:*:application/x-rtcp-stream:*,http-get:*:application/x-rtp-stream:*,http-get:*:application/x-srtcp:*,http-get:*:application/x-srtp:*,http-get:*:application/x-rtcp:*,http-get:*:audio/x-vorbis:*,http-get:*:video/x-theora:*,http-get:*:audio/x-speex:*,http-get:*:audio/x-siren:*,http-get:*:audio/x-sbc:*,http-get:*:meta/x-klv:*,http-get:*:video/x-jpeg:*,http-get:*:image/x-jpc:*,http-get:*:video/x-h261:*,http-get:*:audio/x-opus:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mulaw:*,http-get:*:audio/AMR-WB:*,http-get:*:audio/AMR:*,http-get:*:audio/x-gsm:*,http-get:*:audio/G729:*,http-get:*:audio/x-adpcm:*,http-get:*:audio/G723:*,http-get:*:audio/G722:*,http-get:*:audio/x-iLBC:*,http-get:*:audio/x-celt:*,http-get:*:audio/x-bv:*,http-get:*:audio/x-ac3:*,http-get:*:audio/ac3:*,http-get:*:application/x-rtp:*,http-get:*:audio/x-alaw:*,http-get:*:audio/x-raw:*,http-get:*:application/x-icy:*,http-get:*:video/x-h265:*,http-get:*:video/x-xvid:*,http-get:*:video/x-divx:*,http-get:*:audio/*:*,http-get:*:video/x-wmv:*,http-get:*:video/x-vp9:*,http-get:*:video/x-vp8:*,http-get:*:video/x-sonix:*,http-get:*:video/x-raw:*,http-get:*:video/x-pwc2:*,http-get:*:video/x-pwc1:*,http-get:*:video/x-h264:*,http-get:*:video/x-h263:*,http-get:*:video/x-dv:*,http-get:*:video/x-bayer:*,http-get:*:video/mpegts:*,http-get:*:video/mpeg:*,http-get:*:image/jpeg:*</Sink>\r\n</u:GetProtocolInfoResponse>\r\n</s:Body> </s:Envelope>`),
			"/",
		},
		{
			`parseProtocolInfo Test #1`,
			[]byte(`<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>\n<u:GetProtocolInfoResponse xmlns:u="urn:schemas-upnp-org:service:ConnectionManager:1">\r\n<Source></Source>\r\n<Sink>http-get:*:raw/x-pcap:*,http-get:*:application/x-dtls:*,http-get:*:application/ttml+xml:*,http-get:*:subpicture/x-pgs:*,http-get:*:application/sdp:*,http-get:*:application/x-hls:*,http-get:*:audio/x-stm:*,http-get:*:audio/x-s3m:*,http-get:*:audio/x-it:*,http-get:*:audio/x-xm:*,http-get:*:video/x-cdxa:*,http-get:*:audio/x-vgm:*,http-get:*:audio/x-spc:*,http-get:*:audio/x-sap:*,http-get:*:audio/x-nsf:*,http-get:*:audio/x-kss:*,http-get:*:audio/x-hes:*,http-get:*:audio/x-gym:*,http-get:*:audio/x-gbs:*,http-get:*:audio/x-ay:*,http-get:*:video/x-unaligned-raw:*,http-get:*:audio/x-unaligned-raw:*,http-get:*:audio/x-mod:*,http-get:*:audio/x-sid:*,http-get:*:application/x-teletext:*,http-get:*:subpicture/x-dvb:*,http-get:*:application/x-gdp:*,http-get:*:application/x-rdt:*,http-get:*:application/x-pn-realaudio:*,http-get:*:application/vnd.rn-realmedia:*,http-get:*:image/x-exr:*,http-get:*:video/x-ms-asf:*,http-get:*:application/x-yuv4mpeg:*,http-get:*:application/x-gst-av-wsvqa:*,http-get:*:application/x-gst-av-wsaud:*,http-get:*:application/x-gst-av-wc3movie:*,http-get:*:application/x-gst-av-vmd:*,http-get:*:audio/x-ttafile:*,http-get:*:application/x-gst-av-psxstr:*,http-get:*:application/x-gst-av-sol:*,http-get:*:application/x-gst-av-smk:*,http-get:*:application/x-gst-av-film_cpk:*,http-get:*:video/x-pva:*,http-get:*:application/x-gst-av-nuv:*,http-get:*:application/x-gst-av-nut:*,http-get:*:video/x-nsv:*,http-get:*:application/mxf:*,http-get:*:audio/x-musepack:*,http-get:*:application/x-gst-av-mmf:*,http-get:*:application/x-gst-av-mm:*,http-get:*:video/x-ivf:*,http-get:*:application/x-gst-av-ipmovie:*,http-get:*:application/x-gst-av-idcin:*,http-get:*:application/gxf:*,http-get:*:image/gif:*,http-get:*:application/x-gst-av-ffm:*,http-get:*:application/x-gst-av-ea:*,http-get:*:application/x-gst-av-daud:*,http-get:*:audio/x-brstm:*,http-get:*:audio/x-bfstm:*,http-get:*:application/x-gst-av-avs:*,http-get:*:application/x-ape:*,http-get:*:audio/aiff:*,http-get:*:audio/x-aiff:*,http-get:*:video/x-zmbv:*,http-get:*:video/x-gst-av-xl:*,http-get:*:video/x-xan:*,http-get:*:video/x-gst-av-wnv1:*,http-get:*:video/x-gst-av-vqavideo:*,http-get:*:video/x-vp6:*,http-get:*:video/x-vp5:*,http-get:*:video/x-vp3:*,http-get:*:video/x-vmnc:*,http-get:*:video/x-gst-av-vmdvideo:*,http-get:*:video/x-ati-vcr:*,http-get:*:video/x-ultimotion:*,http-get:*:video/x-tscc:*,http-get:*:video/x-camtasia:*,http-get:*:video/x-truemotion:*,http-get:*:video/sp5x:*,http-get:*:video/x-smc:*,http-get:*:image/x-sgi:*,http-get:*:video/x-apple-video:*,http-get:*:video/x-gst-av-roqvideo:*,http-get:*:video/x-gst-av-qpeg:*,http-get:*:video/x-qdrw:*,http-get:*:image/ppm:*,http-get:*:video/x-gst-av-pgmyuv:*,http-get:*:image/pbm:*,http-get:*:video/x-nuv:*,http-get:*:video/x-mszh:*,http-get:*:video/x-msvideocodec:*,http-get:*:video/x-rle:*,http-get:*:video/x-gst-av-mmvideo:*,http-get:*:video/x-mjpeg-b:*,http-get:*:video/x-mimic:*,http-get:*:video/x-gst-av-mdec:*,http-get:*:video/x-loco:*,http-get:*:video/x-lagarith:*,http-get:*:video/x-kmvc:*,http-get:*:image/jp2:*,http-get:*:video/x-gst-av-interplayvideo:*,http-get:*:video/x-indeo:*,http-get:*:video/x-gst-av-idcinvideo:*,http-get:*:video/x-intel-h263:*,http-get:*:image/gst-libav-gif:*,http-get:*:video/x-fraps:*,http-get:*:video/x-4xm:*,http-get:*:video/x-gst-av-flic:*,http-get:*:video/x-flash-screen2:*,http-get:*:video/x-gst-av-ffvhuff:*,http-get:*:video/x-ffv:*,http-get:*:video/x-gst-av-8bps:*,http-get:*:video/x-dnxhd:*,http-get:*:video/x-compressed-yuv:*,http-get:*:video/x-camstudio:*,http-get:*:video/x-cirrus-logic-accupak:*,http-get:*:video/x-cinepak:*,http-get:*:video/x-cavs:*,http-get:*:video/x-gst-av-avs:*,http-get:*:video/x-asus:*,http-get:*:video/x-amv:*,http-get:*:video/x-apple-intermediate-codec:*,http-get:*:video/x-aasc:*,http-get:*:audio/x-dpcm:*,http-get:*:audio/x-gst-av-ws_snd1:*,http-get:*:audio/x-wms:*,http-get:*:audio/x-gst-av-vmdaudio:*,http-get:*:audio/x-twin-vq:*,http-get:*:audio/x-truespeech:*,http-get:*:audio/x-true-hd:*,http-get:*:audio/x-sipro:*,http-get:*:audio/x-shorten:*,http-get:*:audio/x-qdm2:*,http-get:*:audio/qcelp:*,http-get:*:audio/x-ffmpeg-parsed-musepack:*,http-get:*:audio/x-gst-av-mp3on4:*,http-get:*:audio/x-gst-av-mp3adu:*,http-get:*:audio/x-mlp:*,http-get:*:audio/x-voxware:*,http-get:*:audio/x-mace:*,http-get:*:audio/x-imc:*,http-get:*:audio/x-vnd.sony.atrac3:*,http-get:*:audio/x-vnd.sony.atrac1:*,http-get:*:audio/x-ffmpeg-parsed-ape:*,http-get:*:audio/x-smpte-302m:*,http-get:*:audio/x-dv:*,http-get:*:unknown/unknown:*,http-get:*:audio/x-xi:*,http-get:*:audio/x-w64:*,http-get:*:audio/x-voc:*,http-get:*:audio/x-svx:*,http-get:*:audio/x-sds:*,http-get:*:audio/x-rf64:*,http-get:*:audio/x-paris:*,http-get:*:audio/x-nist:*,http-get:*:audio/x-ircam:*,http-get:*:application/vnd.ms-sstr+xml:*,http-get:*:application/x-ogg-avi:*,http-get:*:application/x-ogm-text:*,http-get:*:application/x-kate:*,http-get:*:text/x-cmml:*,http-get:*:application/x-ogm-audio:*,http-get:*:video/x-daala:*,http-get:*:video/x-smoke:*,http-get:*:application/x-ogm-video:*,http-get:*:application/kate:*,http-get:*:image/webp:*,http-get:*:audio/x-lpcm:*,http-get:*:audio/x-private-ts-lpcm:*,http-get:*:audio/x-private2-lpcm:*,http-get:*:audio/x-private1-lpcm:*,http-get:*:text/plain:*,http-get:*:application/dash+xml:*,http-get:*:audio/ms-gsm:*,http-get:*:application/x-subtitle-vtt:*,http-get:*:application/x-subtitle-lrc:*,http-get:*:application/x-subtitle-qttext:*,http-get:*:application/x-subtitle-dks:*,http-get:*:application/x-subtitle-mpl2:*,http-get:*:application/x-subtitle-tmplayer:*,http-get:*:application/x-subtitle-sami:*,http-get:*:application/x-subtitle:*,http-get:*:audio/x-midi-event:*,http-get:*:application/octet-stream:*,http-get:*:audio/riff-midi:*,http-get:*:audio/midi:*,http-get:*:application/x-bzip:*,http-get:*:multipart/x-mixed-replace:*,http-get:*:application/x-apetag:*,http-get:*:audio/x-wav:*,http-get:*:application/x-id3:*,http-get:*:audio/x-wavpack:*,http-get:*:audio/x-private1-dts:*,http-get:*:audio/x-private1-ac3:*,http-get:*:audio/x-amr-wb-sh:*,http-get:*:audio/x-amr-nb-sh:*,http-get:*:audio/x-nellymoser:*,http-get:*:video/x-vp6-alpha:*,http-get:*:video/x-vp6-flash:*,http-get:*:video/x-flash-screen:*,http-get:*:video/x-flash-video:*,http-get:*:video/x-flv:*,http-get:*:application/x-subtitle-avi:*,http-get:*:video/x-msvideo:*,http-get:*:video/x-av1:*,http-get:*:application/x-subtitle-unknown:*,http-get:*:subpicture/x-dvd:*,http-get:*:application/x-usf:*,http-get:*:application/x-ass:*,http-get:*:application/x-ssa:*,http-get:*:subtitle/x-kate:*,http-get:*:audio/x-wma:*,http-get:*:audio/x-pn-realaudio:*,http-get:*:audio/x-tta:*,http-get:*:video/x-pn-realvideo:*,http-get:*:video/x-msmpeg:*,http-get:*:video/x-huffyuv:*,http-get:*:video/x-matroska-3d:*,http-get:*:video/x-matroska:*,http-get:*:audio/x-matroska:*,http-get:*:video/x-fli:*,http-get:*:audio/x-dts:*,http-get:*:audio/x-eac3:*,http-get:*:audio/webm:*,http-get:*:video/webm:*,http-get:*:video/ogg:*,http-get:*:audio/ogg:*,http-get:*:application/ogg:*,http-get:*:image/svg+xml:*,http-get:*:image/svg:*,http-get:*:image/x-pcx:*,http-get:*:image/x-tga:*,http-get:*:image/x-bitmap:*,http-get:*:image/vnd.wap.wbmp:*,http-get:*:image/x-MS-bmp:*,http-get:*:image/x-bmp:*,http-get:*:image/bmp:*,http-get:*:image/x-portable-pixmap:*,http-get:*:image/x-portable-graymap:*,http-get:*:image/x-portable-bitmap:*,http-get:*:image/x-portable-anymap:*,http-get:*:image/tiff:*,http-get:*:image/x-pixmap:*,http-get:*:image/x-sun-raster:*,http-get:*:image/x-cmu-raster:*,http-get:*:application/x-navi-animation:*,http-get:*:image/x-icon:*,http-get:*:image/x-j2c:*,http-get:*:video/x-mp4-part:*,http-get:*:text/x-raw:*,http-get:*:video/x-qt-part:*,http-get:*:video/x-dirac:*,http-get:*:image/png:*,http-get:*:video/x-svq:*,http-get:*:video/x-cineform:*,http-get:*:video/x-prores:*,http-get:*:audio/alac:*,http-get:*:audio/x-alac:*,http-get:*:application/x-3gp:*,http-get:*:audio/mp4:*,http-get:*:audio/m4a:*,http-get:*:audio/x-m4a:*,http-get:*:video/mj2:*,http-get:*:video/quicktime:*,http-get:*:audio/x-au:*,http-get:*:audio/x-flac:*,http-get:*:application/x-srtcp-stream:*,http-get:*:application/x-srtp-stream:*,http-get:*:application/x-rtcp-stream:*,http-get:*:application/x-rtp-stream:*,http-get:*:application/x-srtcp:*,http-get:*:application/x-srtp:*,http-get:*:application/x-rtcp:*,http-get:*:audio/x-vorbis:*,http-get:*:video/x-theora:*,http-get:*:audio/x-speex:*,http-get:*:audio/x-siren:*,http-get:*:audio/x-sbc:*,http-get:*:meta/x-klv:*,http-get:*:video/x-jpeg:*,http-get:*:image/x-jpc:*,http-get:*:video/x-h261:*,http-get:*:audio/x-opus:*,http-get:*:audio/L16;rate=44100;channels=2:*,http-get:*:audio/x-scpls:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mulaw:*,http-get:*:audio/AMR-WB:*,http-get:*:audio/AMR:*,http-get:*:audio/x-gsm:*,http-get:*:audio/G729:*,http-get:*:audio/x-adpcm:*,http-get:*:audio/G723:*,http-get:*:audio/G722:*,http-get:*:audio/x-iLBC:*,http-get:*:audio/x-celt:*,http-get:*:audio/x-bv:*,http-get:*:audio/x-ac3:*,http-get:*:audio/ac3:*,http-get:*:application/x-rtp:*,http-get:*:audio/x-alaw:*,http-get:*:audio/x-raw:*,http-get:*:application/x-icy:*,http-get:*:video/x-h265:*,http-get:*:video/x-xvid:*,http-get:*:video/x-divx:*,http-get:*:audio/*:*,http-get:*:video/x-wmv:*,http-get:*:video/x-vp9:*,http-get:*:video/x-vp8:*,http-get:*:video/x-sonix:*,http-get:*:video/x-raw:*,http-get:*:video/x-pwc2:*,http-get:*:video/x-pwc1:*,http-get:*:video/x-h264:*,http-get:*:video/x-h263:*,http-get:*:video/x-dv:*,http-get:*:video/x-bayer:*,http-get:*:video/mpegts:*,http-get:*:video/mpeg:*,http-get:*:image/jpeg:*</Sink>\r\n</u:GetProtocolInfoResponse>\r\n</s:Body> </s:Envelope>`),
			"video/mpeg",
		},
	}

	for _, tc := range tt {
		t.Run(tc.name, func(t *testing.T) {
			testing.Short()
			if err := parseProtocolInfo(tc.input, tc.mediaType); err != nil {
				t.Fatalf("%s: Failed to call parseProtocolInfo due to %s", tc.name, err.Error())
			}
		})
	}
}
