SfcProviderServiceFunctionAPI { protected static ServiceFunctions readAllServiceFunctions() { ServiceFunctions sfs; printTraceStart(LOG); InstanceIdentifier<ServiceFunctions> sfsIID = InstanceIdentifier.builder(ServiceFunctions.class).build(); sfs = SfcDataStoreAPI.readTransactionAPI(sfsIID, LogicalDatastoreType.CONFIGURATION); printTraceStop(LOG); return sfs; }  static List<SfServicePath> readServiceFunctionState(SfName serviceFunctionName); static List<RspName> getRspsBySfName(SfName serviceFunctionName); static SfcSfDescMon readServiceFunctionDescriptionMonitor(SfName serviceFunctionName); static boolean deleteServiceFunctionState(SfName serviceFunctionName); static boolean addPathToServiceFunctionState(RenderedServicePath renderedServicePath); static boolean putServiceFunction(ServiceFunction sf); static boolean putServiceFunctionState(ServiceFunctionState sfState); static boolean mergeServiceFunctionState(ServiceFunctionState sfState); static ServiceFunction readServiceFunction(SfName serviceFunctionName); static boolean deleteServicePathFromServiceFunctionState(SfpName sfpName); static boolean deleteServicePathFromServiceFunctionState(List<RspName> rspNames); static boolean deleteRspFromServiceFunctionState(RspName rspName);  }
@Test public void testReadAllServiceFunctionsExecutor() throws Exception { boolean transactionSuccessful = writeRemoveServiceFunctions(IP_MGMT_ADDRESS.get(0), new SftTypeName("firewall"), true); assertTrue("Must be true", transactionSuccessful); ServiceFunctions serviceFunctionsResult = SfcProviderServiceFunctionAPI.readAllServiceFunctions(); assertNotNull("Must not be null", serviceFunctionsResult); assertEquals("Must be equal", serviceFunctionsResult.getServiceFunction().get(0).getName(), SF_NAME); assertEquals("Must be equal", serviceFunctionsResult.getServiceFunction().get(0).getIpMgmtAddress().getIpv4Address().getValue(), IP_MGMT_ADDRESS.get(0)); assertEquals("Must be equal", serviceFunctionsResult.getServiceFunction().get(0).getType(), new SftTypeName("firewall")); transactionSuccessful = writeRemoveServiceFunctions(IP_MGMT_ADDRESS.get(1), new SftTypeName("firewall"), false); assertTrue("Must be true", transactionSuccessful); }