metricsRegexes.add(FLUME_CHANNEL_CAPACITY_PROPERTY);
String metricsList = getMetricsRegexes(metricsRegexes, gangliaPropertyIds, "FLUME_SERVER");
URIBuilder expectedUri = new URIBuilder();
expectedUri.setScheme((configuration.isGangliaSSL() ? "https" : "http"));
expectedUri.setHost("domU-12-31-39-0E-34-E1.compute-1.internal");
expectedUri.setPath("/cgi-bin/rrd.py");
expectedUri.setParameter("c", "HDPFlumeServer,HDPSlaves");
expectedUri.setParameter("h", "ip-10-39-113-33.ec2.internal");
expectedUri.setParameter("m", metricsList);
expectedUri.setParameter("s", "10");
expectedUri.setParameter("e", "20");
expectedUri.setParameter("r", "1");
URIBuilder actualUri = new URIBuilder(streamProvider.getLastSpec());
Assert.assertEquals(expectedUri.getScheme(), actualUri.getScheme());
Assert.assertEquals(expectedUri.getHost(), actualUri.getHost());
Assert.assertEquals(expectedUri.getPath(), actualUri.getPath());
Assert.assertTrue(isUrlParamsEquals(actualUri, expectedUri));
Assert.assertEquals(3, PropertyHelper.getProperties(resource).size());
Assert.assertNotNull(resource.getPropertyValue(FLUME_CHANNEL_CAPACITY_PROPERTY));