+ @Test
+ public void testReadyWithMissingMandatoryData() throws InterruptedException {
+ DOMStoreWriteTransaction writeTx = domStore.newWriteOnlyTransaction();
+ NormalizedNode<?, ?> testNode = ImmutableContainerNodeBuilder.create()
+ .withNodeIdentifier(new NodeIdentifier(TestModel.MANDATORY_DATA_TEST_QNAME))
+ .addChild(ImmutableNodes.leafNode(TestModel.OPTIONAL_QNAME, "data"))
+ .build();
+ writeTx.write(TestModel.MANDATORY_DATA_TEST_PATH, testNode);
+ DOMStoreThreePhaseCommitCohort ready = writeTx.ready();
+ try {
+ ready.canCommit().get();
+ Assert.fail("Expected exception on canCommit");
+ } catch (ExecutionException e) {
+ // nop
+ }
+ }
+