### Question:
SxpIseAdapterProviderInstance implements ClusterSingletonService, AutoCloseable { @Override public void close() throws Exception { LOG.info("Clustering provider closed for {}", this.getClass().getSimpleName()); if (singletonServiceRegistration != null) { try { singletonServiceRegistration.close(); } catch (Exception e) { LOG.warn("{} closed unexpectedly. Cause: {}", e.getMessage()); } singletonServiceRegistration = null; } } SxpIseAdapterProviderInstance(final DataBroker dataBroker,
                                         final BindingAwareBroker bindingAwareBroker,
                                         final ClusterSingletonServiceProvider clusterSingletonService,
                                         final SxpEpProviderProvider sxpEpProvider); void initialize(); @Override void instantiateServiceInstance(); @Override ListenableFuture<Void> closeServiceInstance(); @Override void close(); @Override ServiceGroupIdentifier getIdentifier();  }### Answer:
@Test public void testClose() throws Exception { instance.initialize(); Mockito.verify(clusterSingletonService).registerClusterSingletonService(instance); instance.close(); Mockito.verify(clusterSingletonRegistration).close(); }
@Test public void testClose_null() throws Exception { instance.close(); }