SfcGeniusRspWriter { public CompletableFuture<RenderedServicePath> deleteRsp(RenderedServicePath renderedServicePath) { InstanceIdentifier<RenderedServicePath> rspId = InstanceIdentifier.builder(RenderedServicePaths.class) .child(RenderedServicePath.class, renderedServicePath.getKey()) .build(); transaction.delete(LogicalDatastoreType.OPERATIONAL, rspId); return CompletableFuture.completedFuture(renderedServicePath); } SfcGeniusRspWriter(WriteTransaction transaction); CompletableFuture<RenderedServicePath> deleteRsp(RenderedServicePath renderedServicePath); CompletableFuture<Void> createRsp(RenderedServicePath renderedServicePath);  }
@Test public void deleteRsp() throws Exception { InstanceIdentifier<RenderedServicePath> rspIID = InstanceIdentifier.builder(RenderedServicePaths.class) .child(RenderedServicePath.class, renderedServicePath.getKey()) .build(); RenderedServicePath renderedServicePath1 = sfcGeniusRspWriter.deleteRsp(renderedServicePath).get(); assertThat(renderedServicePath1, sameInstance(renderedServicePath)); verify(writeTransaction).delete(LogicalDatastoreType.OPERATIONAL, rspIID); }