Code review comment: the index isn't relevant to this test.

Code under review:
public void testPortConflictHandling() throws Exception {
		ReporterSetup reporterSetup1 = ReporterSetup.forReporter("test1", new JMXReporter("9020-9035"));
		ReporterSetup reporterSetup2 = ReporterSetup.forReporter("test2", new JMXReporter("9020-9035"));

		MetricRegistryImpl reg = new MetricRegistryImpl(
			MetricRegistryConfiguration.defaultMetricRegistryConfiguration(),
			Arrays.asList(reporterSetup1, reporterSetup2));

		TaskManagerMetricGroup mg = new TaskManagerMetricGroup(reg, "host", "tm");

		List<MetricReporter> reporters = reg.getReporters();

		assertTrue(reporters.size() == 2);

		MetricReporter rep1 = reporters.get(0);
		MetricReporter rep2 = reporters.get(1);

		Gauge<Integer> g1 = new Gauge<Integer>() {
			@Override
			public Integer getValue() {
				return 1;
			}
		};
		Gauge<Integer> g2 = new Gauge<Integer>() {
			@Override
			public Integer getValue() {
				return 2;
			}
		};

		rep1.notifyOfAddedMetric(g1, "rep1", new FrontMetricGroup<>(
			new ReporterScopedSettings(0, '.'),
			new TaskManagerMetricGroup(reg, "host", "tm")));
		rep2.notifyOfAddedMetric(g2, "rep2", new FrontMetricGroup<>(
			new ReporterScopedSettings(0, '.'),
			new TaskManagerMetricGroup(reg, "host", "tm")));

		MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();

		ObjectName objectName1 = new ObjectName(JMX_DOMAIN_PREFIX + "taskmanager.rep1", JMXReporter.generateJmxTable(mg.getAllVariables()));
		ObjectName objectName2 = new ObjectName(JMX_DOMAIN_PREFIX + "taskmanager.rep2", JMXReporter.generateJmxTable(mg.getAllVariables()));

		assertEquals(1, mBeanServer.getAttribute(objectName1, "Value"));
		assertEquals(2, mBeanServer.getAttribute(objectName2, "Value"));

		rep1.notifyOfRemovedMetric(g1, "rep1", null);
		rep1.notifyOfRemovedMetric(g2, "rep2", null);

		mg.close();
		reg.shutdown().get();
	}

Line commented on: new ReporterScopedSettings(0, '.'),

Revised code:
public void testPortConflictHandling() throws Exception {
		ReporterSetup reporterSetup1 = ReporterSetup.forReporter("test1", new JMXReporter("9020-9035"));
		ReporterSetup reporterSetup2 = ReporterSetup.forReporter("test2", new JMXReporter("9020-9035"));

		MetricRegistryImpl reg = new MetricRegistryImpl(
			MetricRegistryConfiguration.defaultMetricRegistryConfiguration(),
			Arrays.asList(reporterSetup1, reporterSetup2));

		TaskManagerMetricGroup mg = new TaskManagerMetricGroup(reg, "host", "tm");

		List<MetricReporter> reporters = reg.getReporters();

		assertTrue(reporters.size() == 2);

		MetricReporter rep1 = reporters.get(0);
		MetricReporter rep2 = reporters.get(1);

		Gauge<Integer> g1 = new Gauge<Integer>() {
			@Override
			public Integer getValue() {
				return 1;
			}
		};
		Gauge<Integer> g2 = new Gauge<Integer>() {
			@Override
			public Integer getValue() {
				return 2;
			}
		};

		rep1.notifyOfAddedMetric(g1, "rep1", new FrontMetricGroup<>(createReporterScopedSettings(0), mg));
		rep2.notifyOfAddedMetric(g2, "rep2", new FrontMetricGroup<>(createReporterScopedSettings(0), mg));

		MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();

		ObjectName objectName1 = new ObjectName(JMX_DOMAIN_PREFIX + "taskmanager.rep1", JMXReporter.generateJmxTable(mg.getAllVariables()));
		ObjectName objectName2 = new ObjectName(JMX_DOMAIN_PREFIX + "taskmanager.rep2", JMXReporter.generateJmxTable(mg.getAllVariables()));

		assertEquals(1, mBeanServer.getAttribute(objectName1, "Value"));
		assertEquals(2, mBeanServer.getAttribute(objectName2, "Value"));

		rep1.notifyOfRemovedMetric(g1, "rep1", null);
		rep1.notifyOfRemovedMetric(g2, "rep2", null);

		mg.close();
		reg.shutdown().get();
	}