import java.util.List;
import java.util.concurrent.ScheduledFuture;
+import javax.annotation.PreDestroy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
/**
* Function which have to stop tasks execution.
*/
+ @PreDestroy
public synchronized void cancelTasks() {
scheduledPrhTaskFutureList.forEach(x -> x.cancel(false));
scheduledPrhTaskFutureList.clear();
@Test
void whenPnfHasActiveService_OnlyPostToPnfUpdateShouldBePerformed() throws SSLException, PrhTaskException {
//given
+ Mono<ConsumerDmaapModel> consumerModel = Mono.just(DMAAP_MODEL);
+
given(consumer.execute()).willReturn(Flux.just(DMAAP_MODEL));
given(aaiQuery.execute(any())).willReturn(Mono.just(true));
+ given(aaiProducer.execute(DMAAP_MODEL)).willReturn(consumerModel);
//when
sut.scheduleMainPrhEventTask();
//then
- verifyThatPnfUpdateWasNotSentToAai();
+ verifyThatPnfUpdateWasSentToAai();
verifyIfLogicalLinkWasNotCreated();
verifyThatPnfModelWasNotSentDmaapPnfReadyTopic();
verifyThatPnfModelWasSentDmaapPnfUpdateTopic();