### Question:
ResourceIdParser { public String getNodeId(String resourceId) { return getMatch(m_nodePattern.matcher(resourceId)); } ResourceIdParser(); String getNodeId(String resourceId); String getResource(String resourceId);  }### Answer:
@Test public void testGetNodeId() { String resourceId = "node[7].responseTime[172.20.1.5]"; ResourceIdParser parser = new ResourceIdParser(); assertEquals("7", parser.getNodeId(resourceId)); }