[103443] Adding Junits
diff --git a/tests/org.eclipse.wst.common.tests/commontests/org/eclipse/wst/common/tests/OperationTestCase.java b/tests/org.eclipse.wst.common.tests/commontests/org/eclipse/wst/common/tests/OperationTestCase.java
index 0fc8f7d..9ce30ef 100644
--- a/tests/org.eclipse.wst.common.tests/commontests/org/eclipse/wst/common/tests/OperationTestCase.java
+++ b/tests/org.eclipse.wst.common.tests/commontests/org/eclipse/wst/common/tests/OperationTestCase.java
@@ -62,6 +62,14 @@
 	public static void runAndVerify(IDataModel dataModel) throws Exception {
 		OperationTestCase.runAndVerify(dataModel, true, true);
 	}
+	public static void runDataModel(IDataModel dataModel) throws Exception {
+		OperationTestCase.runDataModel(dataModel, true, true);
+	}
+
+	public static void runDataModel(IDataModel dataModel, boolean checkTasks, boolean checkLog) throws Exception {
+		OperationTestCase.runDataModel(dataModel, checkTasks, checkLog, null, true, false);
+		
+	}
 
 	/**
 	 * @deprecated
@@ -106,6 +114,9 @@
 	public static void runAndVerify(IDataModel dataModel, boolean checkTasks, boolean checkLog, List errorOKList, boolean reportIfExpectedErrorNotFound, boolean waitForBuildToComplete) throws Exception {
 		runAndVerify(dataModel, checkTasks, checkLog, errorOKList, reportIfExpectedErrorNotFound, false, false);
 	}
+	public static void runDataModel(IDataModel dataModel, boolean checkTasks, boolean checkLog, List errorOKList, boolean reportIfExpectedErrorNotFound, boolean waitForBuildToComplete) throws Exception {
+		runDataModel(dataModel, checkTasks, checkLog, errorOKList, reportIfExpectedErrorNotFound, false, false);
+	}
 
 	/**
 	 * @deprecated
@@ -194,6 +205,47 @@
 			dataModel.dispose();
 		}
 	}
+	/**
+	 * Guaranteed to close the dataModel
+	 * 
+	 * @param dataModel
+	 * @throws Exception
+	 */
+	public static void runDataModel(IDataModel dataModel, boolean checkTasks, boolean checkLog, List errorOKList, boolean reportIfExpectedErrorNotFound, boolean waitForBuildToComplete, boolean removeAllSameTypesOfErrors) throws Exception {
+		PostBuildListener listener = null;
+		IWorkspaceDescription desc = null;
+		try {
+			if (waitForBuildToComplete) {
+				listener = new PostBuildListener();
+				desc = ResourcesPlugin.getWorkspace().getDescription();
+				desc.setAutoBuilding(false);
+				ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_BUILD);
+			}
+			if (checkLog)
+				LogUtility.getInstance().resetLogging();
+			
+			dataModel.getDefaultOperation().execute(new NullProgressMonitor(), null);
+			
+			if (waitForBuildToComplete) {
+				desc.setAutoBuilding(true);
+				while (!listener.isBuildComplete()) {
+					Thread.sleep(3000);// do nothing till all the jobs are completeled
+				}
+			}
+			if (checkTasks && (errorOKList == null || errorOKList.isEmpty())) {
+				checkTasksList();
+			} else if (checkTasks && errorOKList != null && !errorOKList.isEmpty()) {
+				TaskViewUtility.verifyErrors(errorOKList, reportIfExpectedErrorNotFound, removeAllSameTypesOfErrors);
+			}
+			if (checkLog) {
+				checkLogUtility();
+			}
+		} finally {
+			if (listener != null)
+				ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
+			dataModel.dispose();
+		}
+	}
 
 
 	/**