import static org.mockito.Mockito.when;
import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.TRANSACTION_ID;
import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.assertFutureEquals;
-import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.assertOperationThrowsException;
import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.getWithTimeout;
import com.google.common.util.concurrent.FluentFuture;
import org.mockito.Mock;
import org.opendaylight.controller.cluster.access.commands.CommitLocalTransactionRequest;
import org.opendaylight.controller.cluster.access.commands.TransactionCommitSuccess;
-import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
transaction.read(PATH);
}
- @Test
- public void testOpenCloseCursor() {
- final DOMDataTreeWriteCursor cursor = getHandle().openCursor();
- getHandle().closeCursor(cursor);
- getHandle().openCursor().delete(PATH.getLastPathArgument());
- verify(modification).delete(PATH);
- }
-
- @Test
- public void testOpenSecondCursor() throws Exception {
- getHandle().openCursor();
- assertOperationThrowsException(getHandle()::openCursor, IllegalStateException.class);
- }
-
@Test
public void testExists() throws Exception {
final FluentFuture<Boolean> exists = getHandle().exists(PATH);