SfcProviderRpc implements ServiceFunctionService, ServiceFunctionChainService, RenderedServicePathService,
        ServicePathIdService, RenderedIoamPathService { @Override public Future<RpcResult<ReadRenderedServicePathFirstHopOutput>> readRenderedServicePathFirstHop( ReadRenderedServicePathFirstHopInput input) { RenderedServicePathFirstHop renderedServicePathFirstHop = null; RpcResultBuilder<ReadRenderedServicePathFirstHopOutput> rpcResultBuilder; renderedServicePathFirstHop = SfcProviderRenderedPathAPI.readRenderedServicePathFirstHop(new RspName(input.getName())); ReadRenderedServicePathFirstHopOutput renderedServicePathFirstHopOutput = null; if (renderedServicePathFirstHop != null) { ReadRenderedServicePathFirstHopOutputBuilder renderedServicePathFirstHopOutputBuilder = new ReadRenderedServicePathFirstHopOutputBuilder(); renderedServicePathFirstHopOutputBuilder.setRenderedServicePathFirstHop(renderedServicePathFirstHop); renderedServicePathFirstHopOutput = renderedServicePathFirstHopOutputBuilder.build(); rpcResultBuilder = RpcResultBuilder.success(renderedServicePathFirstHopOutput); } else { String message = "Error Reading RSP First Hop from DataStore: " + input.getName(); rpcResultBuilder = RpcResultBuilder.<ReadRenderedServicePathFirstHopOutput>failed() .withError(ErrorType.APPLICATION, message); } return Futures.immediateFuture(rpcResultBuilder.build()); }  static SfcProviderRpc getSfcProviderRpc(); void setDataProvider(DataBroker r); static void setDataProviderAux(DataBroker r); @Override Future<RpcResult<Void>> deleteAllServiceFunction(); @Override Future<RpcResult<Void>> deleteServiceFunction(DeleteServiceFunctionInput input); @Override Future<RpcResult<Void>> putServiceFunction(PutServiceFunctionInput input); @Override Future<RpcResult<ReadServiceFunctionOutput>> readServiceFunction(ReadServiceFunctionInput input); @Override Future<RpcResult<InstantiateServiceFunctionChainOutput>> instantiateServiceFunctionChain(
            InstantiateServiceFunctionChainInput input); @Override Future<RpcResult<Void>> putServiceFunctionChains(PutServiceFunctionChainsInput input); @Override Future<RpcResult<CreateRenderedPathOutput>> createRenderedPath(
            CreateRenderedPathInput createRenderedPathInput); @Override Future<RpcResult<DeleteRenderedPathOutput>> deleteRenderedPath(DeleteRenderedPathInput input); @Override Future<RpcResult<ReadRenderedServicePathFirstHopOutput>> readRenderedServicePathFirstHop(
            ReadRenderedServicePathFirstHopInput input); @Override Future<RpcResult<ReadRspFirstHopBySftListOutput>> readRspFirstHopBySftList(
            ReadRspFirstHopBySftListInput input); @Override Future<RpcResult<TraceRenderedServicePathOutput>> traceRenderedServicePath(
            TraceRenderedServicePathInput input); @Override Future<RpcResult<ReservePathIdRangeOutput>> reservePathIdRange(ReservePathIdRangeInput input); @Override Future<RpcResult<ReadPathIdOutput>> readPathId(ReadPathIdInput input); @Override Future<RpcResult<AllocatePathIdOutput>> allocatePathId(AllocatePathIdInput input); @Override Future<RpcResult<DeletePathIdOutput>> deletePathId(DeletePathIdInput input); @Override Future<RpcResult<SetGenerationAlgorithmOutput>> setGenerationAlgorithm(SetGenerationAlgorithmInput input); @Override Future<RpcResult<CreateIoamPathOutput>> createIoamPath(final CreateIoamPathInput input); @Override Future<RpcResult<DeleteIoamPathOutput>> deleteIoamPath(DeleteIoamPathInput input);  }
@Test public void readRenderedServicePathFirstHopTest() throws Exception { writeRSP(); ReadRenderedServicePathFirstHopInputBuilder readRenderedServicePathFirstHopInputBuilder = new ReadRenderedServicePathFirstHopInputBuilder(); readRenderedServicePathFirstHopInputBuilder.setName(RSP_NAME.getValue()); ReadRenderedServicePathFirstHopInput readRenderedServicePathFirstHopInput = readRenderedServicePathFirstHopInputBuilder.build(); Future<RpcResult<ReadRenderedServicePathFirstHopOutput>> result = sfcProviderRpc.readRenderedServicePathFirstHop(readRenderedServicePathFirstHopInput); assertNotNull(result); assertNotNull(result.get()); assertNotNull(result.get().getResult()); assertTrue(result.get().getErrors().isEmpty()); assertTrue(result.get().isSuccessful()); }
@Test public void readRenderedServicePathFirstHopElseTest() throws Exception { ReadRenderedServicePathFirstHopInputBuilder readRenderedServicePathFirstHopInputBuilder = new ReadRenderedServicePathFirstHopInputBuilder(); readRenderedServicePathFirstHopInputBuilder.setName(RSP_NAME.getValue()); ReadRenderedServicePathFirstHopInput readRenderedServicePathFirstHopInput = readRenderedServicePathFirstHopInputBuilder.build(); Future<RpcResult<ReadRenderedServicePathFirstHopOutput>> result = sfcProviderRpc.readRenderedServicePathFirstHop(readRenderedServicePathFirstHopInput); assertNotNull(result); assertNotNull(result.get()); assertFalse(result.get().getErrors().isEmpty()); }