SfcGeniusRspReader extends SfcGeniusReaderAbstract { public CompletableFuture<RenderedServicePath> readRsp(RspName rspName) { InstanceIdentifier<RenderedServicePath> rspID = InstanceIdentifier.builder(RenderedServicePaths.class) .child(RenderedServicePath.class, new RenderedServicePathKey(rspName)) .build(); return doRead(LogicalDatastoreType.OPERATIONAL, rspID); } SfcGeniusRspReader(ReadTransaction readTransaction, Executor executor); CompletableFuture<RenderedServicePath> readRsp(RspName rspName);  }
@Test public void readRsp() throws Exception { RspName rspName = new RspName("RSP1"); InstanceIdentifier<RenderedServicePath> rspID = InstanceIdentifier.builder(RenderedServicePaths.class) .child(RenderedServicePath.class, new RenderedServicePathKey(rspName)) .build(); doReturn(CompletableFuture.completedFuture(renderedServicePath)) .when(rspReader).doRead(LogicalDatastoreType.OPERATIONAL, rspID); RenderedServicePath rsp = rspReader.readRsp(rspName).get(); assertThat(rsp, is(renderedServicePath)); }