Reduce use of powermockito 05/80205/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Feb 2019 10:43:00 +0000 (11:43 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 7 Feb 2019 11:29:35 +0000 (12:29 +0100)
commit0da31300c6392557e8ee00745a146a205517e31e
tree669bd40b3c90857f80edf256769608f08df1637b
parent481ee7146a5faba9c8a16f87724f6089f7add520
Reduce use of powermockito

Rather than mucking with powermock, use Mockito's partial mocking
on a real instance of HwvtepConnectionManager.

Also proper application of @VisibleForTesting and ovsdbClient mocking
allows us to not mock HwvtepConnectionInstance at all.

We also have a simple utility for setting final fields, use that
to reset Operations static field -- allowing us to not use powermock
in DataChangeListenerTestBase at all.

JIRA: OVSDB-476
Change-Id: I6c321c0455fb886dc0029b2a321f73eb3ba150d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionInstance.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DataChangeListenerTestBase.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/DependencyQueueTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListenerTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperationalStateTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/TransactionInvokerImplTest.java
hwvtepsouthbound/hwvtepsouthbound-impl/src/test/java/org/opendaylight/ovsdb/hwvtepsouthbound/UnMetDependencyGetterTest.java