package org.opendaylight.controller.netconf.monitoring.osgi;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
import java.util.Arrays;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.*;
-
public class NetconfMonitoringActivatorTest {
@Mock
MockitoAnnotations.initMocks(this);
doReturn(filter).when(context).createFilter(anyString());
doNothing().when(context).addServiceListener(any(ServiceListener.class), anyString());
- ServiceReference[] refs = new ServiceReference[2];
+ ServiceReference<?>[] refs = new ServiceReference[2];
doReturn(Arrays.asList(refs)).when(context).getServiceReferences(any(Class.class), anyString());
doReturn(refs).when(context).getServiceReferences(anyString(), anyString());
+ doNothing().when(context).removeServiceListener(any(ServiceListener.class));
}
@Test