### Question:
OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { private static void setFailMode(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder, Bridge bridge) { if (bridge.getFailModeColumn() != null && bridge.getFailModeColumn().getData() != null && !bridge.getFailModeColumn().getData().isEmpty()) { String[] failmodeArray = new String[bridge.getFailModeColumn().getData().size()]; bridge.getFailModeColumn().getData().toArray(failmodeArray); ovsdbBridgeAugmentationBuilder.setFailMode( SouthboundConstants.OVSDB_FAIL_MODE_MAP.inverse().get(failmodeArray[0])); } } OvsdbBridgeUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema,
                                    Map<NodeId, Node> updatedBridgeNodes); @Override void execute(ReadWriteTransaction transaction); @Override void onSuccess(); @Override void onFailure(Throwable throwable);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testSetFailMode() throws Exception { Bridge bridge = mock(Bridge.class); Column<GenericTableSchema, Set<String>> column = mock(Column.class); when(bridge.getFailModeColumn()).thenReturn(column); Set<String> set = new HashSet<>(); set.add("standalone"); when(column.getData()).thenReturn(set); OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder = mock(OvsdbBridgeAugmentationBuilder.class); when(ovsdbBridgeAugmentationBuilder.setFailMode(OvsdbFailModeStandalone.class)) .thenReturn(ovsdbBridgeAugmentationBuilder); Whitebox.invokeMethod(ovsdbBridgeUpdateCommand, "setFailMode", ovsdbBridgeAugmentationBuilder, bridge); verify(bridge, times(5)).getFailModeColumn(); verify(ovsdbBridgeAugmentationBuilder).setFailMode(OvsdbFailModeStandalone.class); }