### Question:
OvsdbConnectionManager implements OvsdbConnectionListener, AutoCloseable { public InstanceIdentifier<Node> getInstanceIdentifier(final ConnectionInfo key) { ConnectionInfo connectionInfo = SouthboundMapper.suppressLocalIpPort(key); return instanceIdentifiers.get(connectionInfo); } OvsdbConnectionManager(final DataBroker db,final TransactionInvoker txInvoker,
                                  final EntityOwnershipService entityOwnershipService,
                                  final OvsdbConnection ovsdbConnection,
                                  final InstanceIdentifierCodec instanceIdentifierCodec,
                                  final UpgradeState upgradeState); @Override void connected(final OvsdbClient externalClient); OvsdbConnectionInstance connectedButCallBacksNotRegistered(final OvsdbClient externalClient); @Override void disconnected(final OvsdbClient client); OvsdbClient connect(final InstanceIdentifier<Node> iid,
            final OvsdbNodeAugmentation ovsdbNode); void disconnect(final OvsdbNodeAugmentation ovsdbNode); @Override void close(); InstanceIdentifier<Node> getInstanceIdentifier(final ConnectionInfo key); OvsdbConnectionInstance getConnectionInstance(final ConnectionInfo key); OvsdbConnectionInstance getConnectionInstance(final OvsdbBridgeAttributes mn); OvsdbConnectionInstance getConnectionInstance(final Node node); OvsdbConnectionInstance getConnectionInstance(final InstanceIdentifier<Node> nodePath); OvsdbClient getClient(final ConnectionInfo connectionInfo); OvsdbClient getClient(final OvsdbBridgeAttributes mn); OvsdbClient getClient(final Node node); Boolean getHasDeviceOwnership(final ConnectionInfo connectionInfo); void reconcileConnection(final InstanceIdentifier<Node> iid, final OvsdbNodeAugmentation ovsdbNode); void stopConnectionReconciliationIfActive(final InstanceIdentifier<Node> iid,
            final OvsdbNodeAugmentation ovsdbNode); void stopBridgeConfigReconciliationIfActive(final InstanceIdentifier<Node> iid); void reconcileBridgeConfigurations(final OvsdbConnectionInstance client); Map<ConnectionInfo, OvsdbConnectionInstance> getClients();  }### Answer:
@Test public void testPutandGetInstanceIdentifier() throws Exception { ConnectionInfo key = mock(ConnectionInfo.class); ConnectionInfo connectionInfo = mock(ConnectionInfo.class); PowerMockito.mockStatic(SouthboundMapper.class); when(SouthboundMapper.suppressLocalIpPort(key)).thenReturn(connectionInfo); instanceIdentifiers = new ConcurrentHashMap<>(); field(OvsdbConnectionManager.class, "instanceIdentifiers").set(ovsdbConnManager, instanceIdentifiers); Whitebox.invokeMethod(ovsdbConnManager, "putInstanceIdentifier", key, iid); Map<ConnectionInfo, OvsdbConnectionInstance> testIids = Whitebox.getInternalState(ovsdbConnManager, "instanceIdentifiers"); assertEquals("Error, size of the hashmap is incorrect", 1, testIids.size()); assertEquals("Error returning correct InstanceIdentifier object", iid, ovsdbConnManager.getInstanceIdentifier(key)); Whitebox.invokeMethod(ovsdbConnManager, "removeInstanceIdentifier", key); Map<ConnectionInfo, OvsdbConnectionInstance> testRemoveIids = Whitebox.getInternalState(ovsdbConnManager, "instanceIdentifiers"); assertEquals("Error, size of the hashmap is incorrect", 0, testRemoveIids.size()); }