Merge "BUG-4117: notification supplier - rename"
[openflowplugin.git] / applications / notification-supplier / src / test / java / org / opendaylight / openflowplugin / applications / notification / supplier / impl / helper / TestSupplierVerifyHelper.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, 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
9 package org.opendaylight.openflowplugin.applications.notification.supplier.impl.helper;
10
11 import org.mockito.Matchers;
12 import org.mockito.Mockito;
13 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
14 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
15 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
16 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18
19 /**
20  * Created by mirehak on 9/2/15.
21  */
22 public class TestSupplierVerifyHelper {
23
24     private TestSupplierVerifyHelper() {
25         throw new UnsupportedOperationException("Test utility class");
26     }
27
28     /**
29      * check if wildcarded path is not null
30      *
31      * @param dataBroker
32      */
33     public static void verifyDataChangeRegistration(DataBroker dataBroker) {
34         Mockito.verify(dataBroker).registerDataChangeListener(
35                 Matchers.eq(LogicalDatastoreType.OPERATIONAL),
36                 Matchers.notNull(InstanceIdentifier.class),
37                 Matchers.notNull(DataChangeListener.class),
38                 Matchers.eq(AsyncDataBroker.DataChangeScope.BASE));
39     }
40 }