InstanceIdentifierUtils { public static InstanceIdentifier<Topology> generateTopologyInstanceIdentifier(final String topologyId) { return InstanceIdentifier.builder(NetworkTopology.class) .child(Topology.class, new TopologyKey(new TopologyId(topologyId))).build(); } private  InstanceIdentifierUtils(); static InstanceIdentifier<Node> createNodePath(final NodeId nodeId); static InstanceIdentifier<Node> getNodePath(final InstanceIdentifier<?> nodeChild); static InstanceIdentifier<Table> createTablePath(final InstanceIdentifier<Node> nodePath,
            final TableKey tableKey); static InstanceIdentifier<Flow> createFlowPath(final InstanceIdentifier<Table> table,
            final FlowKey flowKey); static Short getTableId(final InstanceIdentifier<Table> tablePath); static NodeConnectorKey getNodeConnectorKey(final InstanceIdentifier<?> nodeConnectorPath); static NodeKey getNodeKey(final InstanceIdentifier<?> nodePath); static InstanceIdentifier<NodeConnector> createNodeConnectorIdentifier(final String nodeIdValue,
            final String nodeConnectorIdValue); static InstanceIdentifier<Node> generateNodeInstanceIdentifier(final NodeConnectorRef nodeConnectorRef); static InstanceIdentifier<Table> generateFlowTableInstanceIdentifier(final NodeConnectorRef nodeConnectorRef,
            final TableKey flowTableKey); static InstanceIdentifier<Flow> generateFlowInstanceIdentifier(final NodeConnectorRef nodeConnectorRef,
            final TableKey flowTableKey, final FlowKey flowKey); static InstanceIdentifier<Topology> generateTopologyInstanceIdentifier(final String topologyId);  }
@Test public void testGenerateTopologyInstanceIdentifier() throws Exception { InstanceIdentifier<Topology> topologyInsId = InstanceIdentifierUtils .generateTopologyInstanceIdentifier(STR_ID_1); assertNotNull(topologyInsId); assertEquals(STR_ID_1, topologyInsId.firstKeyOf(Topology.class, TopologyKey.class).getTopologyId().getValue()); }