### Question:
OvsdbManagersRemovedCommand extends AbstractTransactionCommand { @VisibleForTesting List<InstanceIdentifier<ManagerEntry>> managerEntriesToRemove( InstanceIdentifier<Node> ovsdbNodeIid, OpenVSwitch openVSwitch) { requireNonNull(ovsdbNodeIid); requireNonNull(openVSwitch); List<InstanceIdentifier<ManagerEntry>> result = new ArrayList<>(); OpenVSwitch oldOvsdbNode = oldOpenVSwitchRows.get(openVSwitch.getUuid()); if (oldOvsdbNode != null && oldOvsdbNode.getManagerOptionsColumn() != null) { for (UUID managerUuid: oldOvsdbNode.getManagerOptionsColumn().getData()) { if (openVSwitch.getManagerOptionsColumn() == null || !openVSwitch.getManagerOptionsColumn().getData().contains(managerUuid)) { Manager manager = removedManagerRows.get(managerUuid); if (!checkIfManagerPresentInUpdatedManagersList(manager)) { if (manager != null && manager.getTargetColumn() != null) { InstanceIdentifier<ManagerEntry> iid = ovsdbNodeIid .augmentation(OvsdbNodeAugmentation.class) .child(ManagerEntry.class, new ManagerEntryKey( new Uri(manager.getTargetColumn().getData()))); result.add(iid); } } } } } return result; } OvsdbManagersRemovedCommand(OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testManagerEntriesToRemove() throws Exception { OpenVSwitch openVSwitch = mock(OpenVSwitch.class); UUID uuid = mock(UUID.class); OpenVSwitch oldOvsdbNode = mock(OpenVSwitch.class); oldOpenVSwitchRows = new HashMap<>(); oldOpenVSwitchRows.put(uuid, oldOvsdbNode); when(openVSwitch.getUuid()).thenReturn(uuid); MemberModifier.field(OvsdbManagersRemovedCommand.class, "oldOpenVSwitchRows").set(ovsdbManagersRemovedCommand, oldOpenVSwitchRows); Column<GenericTableSchema, Set<UUID>> column = mock(Column.class); Set<UUID> set = new HashSet<>(); UUID controllerUuid = mock(UUID.class); set.add(controllerUuid); when(column.getData()).thenReturn(set); when(oldOvsdbNode.getManagerOptionsColumn()).thenReturn(column); when(column.getData()).thenReturn(set); when(openVSwitch.getManagerOptionsColumn()).thenReturn(column); InstanceIdentifier<Node> bridgeIid = mock(InstanceIdentifier.class); List<InstanceIdentifier<BridgeOtherConfigs>> resultManagerEntries = Whitebox .invokeMethod(ovsdbManagersRemovedCommand, "managerEntriesToRemove", bridgeIid, openVSwitch); assertEquals(ArrayList.class, resultManagerEntries.getClass()); verify(oldOvsdbNode, times(2)).getManagerOptionsColumn(); }