SfcSffToOvsMappingAPI { public static List<OvsdbTerminationPointAugmentation> buildTerminationPointAugmentationList( List<SffDataPlaneLocator> sffDataPlaneLocatorList) { Preconditions.checkNotNull(sffDataPlaneLocatorList, "Cannot build TerminationPointAugmentation, SffDataPlaneLocatorList is null."); List<OvsdbTerminationPointAugmentation> ovsdbTerminationPointList = new ArrayList<>(); for (SffDataPlaneLocator sffDataPlaneLocator : sffDataPlaneLocatorList) { OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder = new OvsdbTerminationPointAugmentationBuilder(); ovsdbTerminationPointBuilder.setName(sffDataPlaneLocator.getName().getValue()); ovsdbTerminationPointBuilder .setInterfaceType(getDataPlaneLocatorInterfaceType(sffDataPlaneLocator.getDataPlaneLocator())); List<Options> optionsList = getSffDataPlaneLocatorOptions(sffDataPlaneLocator); if (!optionsList.isEmpty()) { ovsdbTerminationPointBuilder.setOptions(optionsList); } ovsdbTerminationPointList.add(ovsdbTerminationPointBuilder.build()); } return ovsdbTerminationPointList; }  static OvsdbBridgeAugmentation buildOvsdbBridgeAugmentation(
            ServiceFunctionForwarder serviceFunctionForwarder, ExecutorService executor); static List<OvsdbTerminationPointAugmentation> buildTerminationPointAugmentationList(
            List<SffDataPlaneLocator> sffDataPlaneLocatorList);  }
@Test public void testBuildTerminationPointAugmentationList() throws Exception { List<SffDataPlaneLocator> sffDataPlaneLocatorList = new ArrayList<>(); dataPlaneLocatorBuilder = new DataPlaneLocatorBuilder(); ovsOptionsBuilder = new OvsOptionsBuilder(); sffDataPlaneLocatorBuilder = new SffDataPlaneLocatorBuilder(); sffOvsLocatorOptionsAugmentationBuilder = new SffOvsLocatorOptionsAugmentationBuilder(); sffDataPlaneLocatorBuilder.setName(new SffDataPlaneLocatorName(testString)); ovsOptionsBuilder.setLocalIp(OVSDB_OPTION_LOCAL_IP_VALUE) .setRemoteIp(OVSDB_OPTION_REMOTE_IP_VALUE) .setDstPort(OVSDB_OPTION_DST_PORT_VALUE) .setKey(OVSDB_OPTION_KEY) .setNsp(OVSDB_OPTION_NSP) .setNsi(OVSDB_OPTION_NSI); sffOvsLocatorOptionsAugmentationBuilder.setOvsOptions(ovsOptionsBuilder.build()); sffDataPlaneLocatorBuilder .addAugmentation(SffOvsLocatorOptionsAugmentation.class, sffOvsLocatorOptionsAugmentationBuilder.build()) .setDataPlaneLocator(dataPlaneLocatorBuilder.build()); sffDataPlaneLocatorList.add(sffDataPlaneLocatorBuilder.build()); ovsdbTerminationPointAugmentationList = SfcSffToOvsMappingAPI.buildTerminationPointAugmentationList(sffDataPlaneLocatorList); assertEquals("Must be equal", ovsdbTerminationPointAugmentationList.get(0).getName(), testString); }