[main] INFO org.opendaylight.bgpcep.config.loader.impl.AbstractWatchingConfigLoader - Config Loader service started [main] INFO org.opendaylight.bgpcep.config.loader.impl.AbstractWatchingConfigLoader - Config Loader service stopping Exception in thread "Config Loader Watcher Thread" org.mockito.exceptions.misusing.UnfinishedStubbingException: Unfinished stubbing detected here: -> at org.opendaylight.bgpcep.config.loader.impl.OSGiConfigLoaderTest.lambda$before$0(OSGiConfigLoaderTest.java:52) E.g. thenReturn() may be missing. Examples of correct stubbing: when(mock.isOk()).thenReturn(true); when(mock.isOk()).thenThrow(exception); doThrow(exception).when(mock).someVoidMethod(); Hints: 1. missing thenReturn() 2. you are trying to stub a final method, which is not supported 3. you are stubbing the behaviour of another mock inside before 'thenReturn' instruction is completed at org.opendaylight.bgpcep.config.loader.impl.OSGiConfigLoaderTest.lambda$before$0(OSGiConfigLoaderTest.java:52) at org.opendaylight.bgpcep.config.loader.impl.AbstractWatchingConfigLoader.dispatchEvents(AbstractWatchingConfigLoader.java:69) at java.base/java.lang.Thread.run(Thread.java:833) [main] INFO org.opendaylight.bgpcep.config.loader.impl.AbstractWatchingConfigLoader - Config Loader service stopped