public void setUp() throws Exception {
super.setUp();
this.bgpPeer = new BgpPeer(Mockito.mock(RpcProviderRegistry.class));
- Mockito.doNothing().when(this.serviceRegistration).unregister();
}
@Test
} catch (final IllegalStateException expected) {
assertEquals("Previous peer instance was not closed.", expected.getMessage());
}
- this.bgpPeer.setServiceRegistration(this.serviceRegistration);
this.bgpPeer.closeServiceInstance();
this.bgpPeer.close();
verify(this.future).cancel(true);
this.bgpPeer.closeServiceInstance();
this.bgpPeer.close();
- verify(this.serviceRegistration).unregister();
verify(this.future, times(2)).cancel(true);
final Neighbor neighborDiffConfig = new NeighborBuilder().setNeighborAddress(NEIGHBOR_ADDRESS)