private static final DataTreeSnapshot DATA_TREE_SNAPSHOT = mock(DataTreeSnapshot.class);
private static final DataTreeModification DATA_TREE_MODIFICATION = mock(DataTreeModification.class);
- private static final TransactionReadyPrototype TRANSACTION_READY_PROTOTYPE = mock(TransactionReadyPrototype.class);
+ private static final TransactionReadyPrototype TRANSACTION_READY_PROTOTYPE = mock(TransactionReadyPrototype.class);
private SnapshotBackedReadWriteTransaction snapshotBackedReadWriteTransaction;
@Before
assertEquals(optional, snapshotBackedReadWriteTransaction.read(YangInstanceIdentifier.EMPTY).get());
}
+ @SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:IllegalCatch"})
@Test(expected = ReadFailedException.class)
public void readTestWithNullException() throws Throwable {
doReturn(null).when(DATA_TREE_MODIFICATION).readNode(YangInstanceIdentifier.EMPTY);
}
}
+ @SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:IllegalCatch"})
@Test(expected = ReadFailedException.class)
public void readNodeTestWithException() throws Throwable {
doThrow(new NullPointerException("no Node")).when(DATA_TREE_MODIFICATION).readNode(any());
}
}
+ @SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:IllegalCatch"})
@Test(expected = ReadFailedException.class)
public void existsTestWithException() throws Throwable {
doThrow(new NullPointerException("no Node")).when(DATA_TREE_MODIFICATION).readNode(any());
throw e.getCause();
}
}
-}
\ No newline at end of file
+}