Fix tests/requirements.txt
[transportpce.git] / dmaap-client / src / test / java / org / opendaylight / transportpce / dmaap / client / impl / DmaapClientProviderTest.java
1 /*
2  * Copyright © 2021 Orange, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.transportpce.dmaap.client.impl;
9
10 import static org.mockito.Mockito.times;
11 import static org.mockito.Mockito.verify;
12
13 import org.junit.jupiter.api.BeforeEach;
14 import org.junit.jupiter.api.Test;
15 import org.mockito.Mock;
16 import org.mockito.Mockito;
17 import org.mockito.MockitoAnnotations;
18 import org.opendaylight.mdsal.binding.api.NotificationService;
19 import org.opendaylight.transportpce.dmaap.client.listener.NbiNotificationsListenerImpl;
20
21
22 public class DmaapClientProviderTest {
23
24     @Mock
25     private NotificationService notificationService;
26
27     @BeforeEach
28     void init() {
29         MockitoAnnotations.openMocks(this);
30     }
31
32     @Test
33     void testInitRegisterNbiNotificationsToRpcRegistry() {
34         new DmaapClientProvider(notificationService, "http://localhost", "username", "password");
35         verify(notificationService, times(1))
36             .registerNotificationListener(Mockito.any(NbiNotificationsListenerImpl.class));
37     }
38
39 }