import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
RuntimeException thrown = new RuntimeException();
doThrow(thrown).when(domStoreWriteTransaction).ready();
AbstractDOMBrokerWriteTransactionTestImpl abstractDOMBrokerWriteTransactionTestImpl =
new AbstractDOMBrokerWriteTransactionTestImpl();
RuntimeException thrown = new RuntimeException();
doThrow(thrown).when(domStoreWriteTransaction).ready();
AbstractDOMBrokerWriteTransactionTestImpl abstractDOMBrokerWriteTransactionTestImpl =
new AbstractDOMBrokerWriteTransactionTestImpl();
- } catch (TransactionCommitFailedException e) {
- assertTrue(e.getCause() == thrown);
+ } catch (ExecutionException e) {
+ assertTrue(e.getCause() instanceof TransactionCommitFailedException);
+ assertTrue(e.getCause().getCause() == thrown);
AbstractDOMBrokerWriteTransactionTestImpl abstractDOMBrokerWriteTransactionTestImpl
= new AbstractDOMBrokerWriteTransactionTestImpl();
AbstractDOMBrokerWriteTransactionTestImpl abstractDOMBrokerWriteTransactionTestImpl
= new AbstractDOMBrokerWriteTransactionTestImpl();
- } catch (TransactionCommitFailedException e) {
- assertTrue(e.getCause() == thrown);
+ } catch (ExecutionException e) {
+ assertTrue(e.getCause() instanceof TransactionCommitFailedException);
+ assertTrue(e.getCause().getCause() == thrown);