EasyMock.expect(i.getLocation()).andReturn("somewhere");
EasyMock.replay(i);
JmxInstance ji = new JmxInstance(i);
TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));
Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
Assert.assertEquals("MyInstance", keys.iterator().next());
CompositeData cd = td.get(keys.toArray());
Assert.assertEquals(1712, cd.get("Pid"));
Assert.assertEquals("MyInstance", cd.get("Name"));