SfcGeniusBoundServiceWriter { public CompletableFuture<Void> unbindService(String interfaceName) { return new GeniusServiceBinder() .unbindService( transaction, interfaceName, NwConstants.SFC_SERVICE_INDEX); } SfcGeniusBoundServiceWriter(WriteTransaction transaction); CompletableFuture<Void> bindService(String interfaceName); CompletableFuture<Void> unbindService(String interfaceName);  }
@Test public void unbindService() throws Exception { CompletableFuture<Void> future = writer.unbindService("IF2"); verify(writeTransaction).delete(eq(LogicalDatastoreType.CONFIGURATION), instanceIdentifierCaptor.capture()); assertThat(future.isDone(), is(true)); assertThat(future.isCompletedExceptionally(), is(false)); assertThat(future.isCancelled(), is(false)); InstanceIdentifier<BoundServices> iid = instanceIdentifierCaptor.getValue(); assertThat(iid.firstKeyOf(ServicesInfo.class), is(new ServicesInfoKey("IF2", ServiceModeIngress.class))); assertThat(iid.firstKeyOf(BoundServices.class), is(new BoundServicesKey(NwConstants.SFC_SERVICE_INDEX))); }