### Question:
DataStoreHelper { public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } }  static Optional<T> readFromDs(LogicalDatastoreType store, InstanceIdentifier<T> path, ReadTransaction rTx); static boolean submitToDs(WriteTransaction wTx); static Optional<T> removeIfExists(LogicalDatastoreType store, InstanceIdentifier<T> path,
            ReadWriteTransaction rwTx);  }### Answer:
@Test public void testSubmitToDs() { Assert.assertTrue(DataStoreHelper.submitToDs(writeTransaction)); }
@Test public void testSubmitToDs_Exception() throws Exception { doThrow(new TransactionCommitFailedException(EXCEPTION_MESSAGE)).when(submitFuture).checkedGet(); Assert.assertFalse(DataStoreHelper.submitToDs(writeTransaction)); }