SfcProviderRenderedPathAPI { private static SfcServiceFunctionSchedulerAPI getServiceFunctionScheduler( Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType) { SfcServiceFunctionSchedulerAPI scheduler; if (serviceFunctionSchedulerType == RoundRobin.class) { scheduler = new SfcServiceFunctionRoundRobinSchedulerAPI(); } else if (serviceFunctionSchedulerType == LoadBalance.class) { scheduler = new SfcServiceFunctionLoadBalanceSchedulerAPI(); } else if (serviceFunctionSchedulerType == Random.class) { scheduler = new SfcServiceFunctionRandomSchedulerAPI(); } else if (serviceFunctionSchedulerType == ShortestPath.class) { scheduler = new SfcServiceFunctionShortestPathSchedulerAPI(); } else if (serviceFunctionSchedulerType == LoadPathAware.class) { scheduler = new SfcServiceFunctionLoadPathAwareSchedulerAPI(); } else { scheduler = new SfcServiceFunctionRandomSchedulerAPI(); } return scheduler; }  static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath,
            CreateRenderedPathInput createRenderedPathInput, SfcServiceFunctionSchedulerAPI scheduler); static RenderedServicePath createRenderedServicePathAndState(ServiceFunctionPath createdServiceFunctionPath,
            CreateRenderedPathInput createRenderedPathInput); static RenderedServicePath createSymmetricRenderedServicePathAndState(
            RenderedServicePath renderedServicePath); static RenderedServicePath createReverseRenderedServicePathEntry(RenderedServicePath renderedServicePath); static RspName generateReversedPathName(RspName rspName); static RspName getReversedRspName(RspName rspName); static RenderedServicePath readRenderedServicePath(RspName rspName); static boolean deleteRenderedServicePaths(List<RspName> servicePaths); static boolean deleteRenderedServicePathsAndStates(List<RspName> rspNames); static boolean deleteRenderedServicePath(RspName renderedServicePathName); static RenderedServicePathFirstHop readRenderedServicePathFirstHop(RspName rspName); static RenderedServicePathFirstHop readRspFirstHopBySftList(
            Class<? extends ServiceFunctionSchedulerTypeIdentity> serviceFunctionSchedulerType,
            List<SftTypeName> serviceFunctionTypeList); static boolean setSymmetricPathId(RenderedServicePath renderedServicePath, long pathId); static boolean isChainSymmetric(ServiceFunctionPath sfp, RenderedServicePath rsp); static String createRenderedIoamPath(String sysName); static boolean deleteRenderedIoamPath(String renderedIoamPathName);  }
@Test public void testGetServiceFunctionScheduler() throws Exception { SfcServiceFunctionSchedulerAPI rrResult, lbResult, rnResult, spResult, rsResult; rrResult = Whitebox.invokeMethod(SfcProviderRenderedPathAPI.class, "getServiceFunctionScheduler", RoundRobin.class); lbResult = Whitebox.invokeMethod(SfcProviderRenderedPathAPI.class, "getServiceFunctionScheduler", LoadBalance.class); rnResult = Whitebox.invokeMethod(SfcProviderRenderedPathAPI.class, "getServiceFunctionScheduler", Random.class); spResult = Whitebox.invokeMethod(SfcProviderRenderedPathAPI.class, "getServiceFunctionScheduler", ShortestPath.class); rsResult = Whitebox.invokeMethod(SfcProviderRenderedPathAPI.class, "getServiceFunctionScheduler", ServiceFunctionSchedulerTypeIdentity.class); assertEquals("Must be equal", rrResult.getClass(), SfcServiceFunctionRoundRobinSchedulerAPI.class); assertEquals("Must be equal", lbResult.getClass(), SfcServiceFunctionLoadBalanceSchedulerAPI.class); assertEquals("Must be equal", rnResult.getClass(), SfcServiceFunctionRandomSchedulerAPI.class); assertEquals("Must be equal", spResult.getClass(), SfcServiceFunctionShortestPathSchedulerAPI.class); assertEquals("Must be equal", rsResult.getClass(), SfcServiceFunctionRandomSchedulerAPI.class); }