### Question:
OvsdbConnectionManager implements OvsdbConnectionListener, AutoCloseable { @Override public void close() { if (ovsdbDeviceEntityOwnershipListener != null) { ovsdbDeviceEntityOwnershipListener.close(); } for (OvsdbConnectionInstance client: clients.values()) { client.disconnect(); } } 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 testClose() throws Exception { ConnectionInfo key1 = mock(ConnectionInfo.class); ConnectionInfo key2 = mock(ConnectionInfo.class); OvsdbConnectionInstance ovsdbConnectionInstance1 = mock(OvsdbConnectionInstance.class); OvsdbConnectionInstance ovsdbConnectionInstance2 = mock(OvsdbConnectionInstance.class); clients = new ConcurrentHashMap<>(); clients.put(key1, ovsdbConnectionInstance1); clients.put(key2, ovsdbConnectionInstance2); MemberModifier.field(OvsdbConnectionManager.class, "clients").set(ovsdbConnManager, clients); ovsdbConnManager.close(); verify(ovsdbConnectionInstance1).disconnect(); verify(ovsdbConnectionInstance2).disconnect(); }