@Mock
private ClientTransaction delegate;
@Mock
- private NormalizedNode data;
+ private NormalizedNode<?, ?> data;
@Mock
private YangInstanceIdentifier path;
@Mock
private DOMStoreThreePhaseCommitCohort readyCohort;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
MockitoAnnotations.initMocks(this);
Mockito.doReturn(TRANSACTION_ID).when(delegate).getIdentifier();
Mockito.doReturn(readyCohort).when(delegate).ready();
- object = new ClientBackedWriteTransaction(delegate);
+ object = new ClientBackedWriteTransaction(delegate, null);
}
@Override
- ClientBackedWriteTransaction object() throws Exception {
+ ClientBackedWriteTransaction object() {
return object;
}
@Test
- public void testWrite() throws Exception {
+ public void testWrite() {
object().write(path, data);
Mockito.verify(delegate).write(path, data);
}
@Test
- public void testMerge() throws Exception {
+ public void testMerge() {
object().merge(path, data);
Mockito.verify(delegate).merge(path, data);
}
@Test
- public void testDelete() throws Exception {
+ public void testDelete() {
object().delete(path);
Mockito.verify(delegate).delete(path);
}
@Test
- public void testReady() throws Exception {
- final org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort result = object().ready();
+ public void testReady() {
+ final DOMStoreThreePhaseCommitCohort result = object().ready();
Assert.assertNotNull(result);
Mockito.verify(delegate).ready();
}
-}
\ No newline at end of file
+}