@Test
public void testWithMetadata() throws IOException {
int bitRate = 192;
JizzStation mockStation = new JizzStation();
mockStation.setName("Test");
mockStation.setUrl("http://www.test.com/");
ShoutcastStreamer streamer = new ShoutcastStreamer(mockStation, bitRate);
Vector<String> headerValues = new Vector<>();
headerValues.add("true");
streamer.setRequestHeader("icy-metadata", headerValues.elements());
List<BroadcastStreamer.Header> headers = new ArrayList<>();
headers.add(new Header("icy-notice1", "<BR>This stream requires "
+ "<a href=\"http://www.winamp.com/\">Winamp</a><BR>", true));
// Look up version from META-INF/manifest
headers.add(new Header("icy-notice2", "SHOUTcast Distributed Network "
+ "Audio Server/jizz v1.0.0-SNAPSHOT<BR>", true));
headers.add(new Header("icy-name", mockStation.getName(), true));
headers.add(new Header("icy-genre", "Various", true));
headers.add(new Header("icy-url", mockStation.getUrl(), true));
headers.add(new Header("Content-Type", "audio/mpeg", true));
headers.add(new Header("icy-pub", Integer.valueOf(1), true));
headers.add(new Header("icy-br", bitRate, true));
headers.add(new Header("icy-metaint", 8192, true));