import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType.DELETE;
import static org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType.SUBTREE_MODIFIED;
/**
* Test that checks if {@link NodeConnectorEventsObserver#nodeConnectorAdded} is called
* for each FlowCapableNodeConnector item added in
- * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeModification}.
+ * {@link org.opendaylight.mdsal.binding.api.DataTreeModification}.
*/
@Test
public void testNodeConnectorCreation() {
FlowCapableNodeConnector fcnc = TestUtils.createFlowCapableNodeConnector(true, false).build();
DataTreeModification dataTreeModification = setupDataTreeChange(WRITE, ID, fcnc);
translator.onDataTreeChanged(Collections.singleton(dataTreeModification));
- verifyZeroInteractions(eventsObserver);
+ verifyNoInteractions(eventsObserver);
}
/**
FlowCapableNodeConnector fcnc = TestUtils.createFlowCapableNodeConnector(false, true).build();
DataTreeModification dataTreeModification = setupDataTreeChange(WRITE, ID, fcnc);
translator.onDataTreeChanged(Collections.singleton(dataTreeModification));
- verifyZeroInteractions(eventsObserver);
+ verifyNoInteractions(eventsObserver);
}
/**
* Test that checks if {@link NodeConnectorEventsObserver#nodeConnectorRemoved} is called
* for each FlowCapableNodeConnector item that have link down state removed in
- * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeModification}.
+ * {@link org.opendaylight.mdsal.binding.api.DataTreeModification}.
*/
@Test
public void testNodeConnectorUpdateToLinkDown() {
/**
* Test that checks if {@link NodeConnectorEventsObserver#nodeConnectorRemoved} is called
* for each FlowCapableNodeConnector item with administrative down state removed in
- * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeModification}.
+ * {@link org.opendaylight.mdsal.binding.api.DataTreeModification}.
*/
@Test
public void testNodeConnectorUpdateToAdminDown() {
/**
* Test that checks if {@link NodeConnectorEventsObserver#nodeConnectorAdded} is called
* for each FlowCapableNodeConnector item with administrative up and link up state added in
- * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeModification}.
+ * {@link org.opendaylight.md}.
*/
@Test
public void testNodeConnectorUpdateToUp() {
/**
* Test that checks if {@link NodeConnectorEventsObserver#nodeConnectorRemoved} is called
* for each FlowCapableNodeConnector path that
- * {@link org.opendaylight.controller.md.sal.binding.api.DataTreeModification} return.
+ * {@link org.opendaylight.mdsal.binding.api.DataTreeModification} return.
*/
@Test
public void testNodeConnectorRemoval() {
* observers are registered for notifications.
*/
@Test
- public void testMultipleObserversNotified() throws Exception {
+ public void testMultipleObserversNotified() {
// Create prerequisites
InstanceIdentifier<NodeConnector> id2 = TestUtils.createNodeConnectorId("openflow:1", "openflow:1:2");
InstanceIdentifier<FlowCapableNodeConnector> iiToConnector2 = id2.augmentation(FlowCapableNodeConnector.class);
- List<DataTreeModification> modifications = new ArrayList();
+ List<DataTreeModification> modifications = new ArrayList<>();
modifications.add(setupDataTreeChange(WRITE, NODE_CONNECTOR_INSTANCE_IDENTIFIER, FLOW_CAPABLE_NODE_CONNECTOR));
modifications.add(setupDataTreeChange(DELETE, iiToConnector2, null));
// Invoke onDataTreeChanged and check that both observers notified
}
@Test
- public void tearDown() throws Exception {
+ public void tearDown() {
translator.close();
}