airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1397565 - in /airavata/trunk/modules/registry/airavata-jpa-registry/src: main/java/org/apache/airavata/persistance/registry/jpa/ test/java/org/apache/airavata/persistance/registry/jpa/
Date Fri, 12 Oct 2012 13:52:30 GMT
Author: chathuri
Date: Fri Oct 12 13:52:28 2012
New Revision: 1397565

URL: http://svn.apache.org/viewvc?rev=1397565&view=rev
Log:
adding abstract test class and extend all the other test classes from it

Added:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
Removed:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/Test.java
Modified:
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ConfigurationResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ProjectResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/PublishWorkflowResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserWorkflowResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkerResourceTest.java
    airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java

Added: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java?rev=1397565&view=auto
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java (added)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/AbstractResourceTest.java Fri Oct 12 13:52:28 2012
@@ -0,0 +1,66 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.persistance.registry.jpa;
+
+import junit.framework.TestCase;
+import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
+import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
+import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
+import org.apache.airavata.persistance.registry.jpa.util.Initialize;
+
+public abstract class AbstractResourceTest extends TestCase {
+
+    private GatewayResource gatewayResource;
+    private WorkerResource workerResource;
+    private UserResource userResource;
+
+    private Initialize initialize;
+    @Override
+    public void setUp() throws Exception {
+        initialize = new Initialize();
+        initialize.initializeDB();
+        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        userResource = (UserResource)gatewayResource.create(ResourceType.USER);
+        userResource.setUserName("testUser");
+        userResource.setPassword("testUser");
+    }
+
+    @Override
+    public void tearDown() throws Exception {
+        initialize.stopDerbyServer();
+    }
+
+    public GatewayResource getGatewayResource() {
+        return gatewayResource;
+    }
+
+    public WorkerResource getWorkerResource() {
+        return workerResource;
+    }
+
+    public UserResource getUserResource() {
+        return userResource;
+    }
+
+
+}

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ApplicationDescriptorResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,34 +21,22 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 import org.apache.airavata.persistance.registry.jpa.resources.ApplicationDescriptorResource;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 import org.junit.*;
 
-public class ApplicationDescriptorResourceTest extends TestCase {
+public class ApplicationDescriptorResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
-    private Initialize initialize;
 
     @BeforeClass
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        Class[] testClasses = { ConfigurationResourceTest.class,
-                GatewayResourceTest.class, UserResourceTest.class, WorkerResourceTest.class, ProjectResourceTest.class,
-                HostDescriptorResourceTest.class, ServiceDescriptorResourceTest.class, ApplicationDescriptorResourceTest.class,
-                UserWorkflowResourceTest.class, PublishWorkflowResourceTest.class,
-                ExperimentResourceTest.class, ExperimentMetadataResourceTest.class, ExperimentDataResourceTest.class,
-                WorkflowDataResourceTest.class, NodeDataResourceTest.class, GramDataResourceTest.class};
-        TestSuite testSuite = new TestSuite(testClasses);
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
     }
 
     @org.junit.Test
-    public void testSave() throws Exception{
-        ApplicationDescriptorResource applicationDescriptorResouce = (ApplicationDescriptorResource)gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
+    public void testSave() throws Exception {
+        ApplicationDescriptorResource applicationDescriptorResouce = (ApplicationDescriptorResource) gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
         applicationDescriptorResouce.setHostDescName("testHostDesc");
         applicationDescriptorResouce.setServiceDescName("testServiceDesc");
         applicationDescriptorResouce.setName("testAppDesc");
@@ -56,7 +44,7 @@ public class ApplicationDescriptorResour
         applicationDescriptorResouce.setUpdatedUser("testUser");
         applicationDescriptorResouce.save();
 
-        if(gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc") ){
+        if (gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc")) {
             assertTrue("application descriptor saved successfully", true);
         }
 
@@ -64,8 +52,7 @@ public class ApplicationDescriptorResour
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ConfigurationResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ConfigurationResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ConfigurationResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ConfigurationResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,34 +21,32 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.ConfigurationResource;
 import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class ConfigurationResourceTest extends TestCase {
+public class ConfigurationResourceTest extends AbstractResourceTest {
+
+    private Initialize initialize;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-//        super.setUp();
+        super.setUp();
     }
 
     public void testSave() throws Exception {
         ConfigurationResource configuration = ResourceUtils.createConfiguration("testConfigKey");
         configuration.setConfigVal("testConfigValue");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         configuration.setExpireDate(currentTime);
         configuration.save();
 
-        if(ResourceUtils.isConfigurationExist("testConfigKey")){
-            assertTrue("Configuration Save succuessful" , true);
+        if (ResourceUtils.isConfigurationExist("testConfigKey")) {
+            assertTrue("Configuration Save succuessful", true);
         }
 
         //remove test configuration
@@ -56,8 +54,7 @@ public class ConfigurationResourceTest e
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentDataResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,15 +21,12 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
-import java.sql.Date;
 import java.sql.Timestamp;
 import java.util.Calendar;
 
-public class ExperimentDataResourceTest extends TestCase {
+public class ExperimentDataResourceTest extends AbstractResourceTest {
     private ExperimentDataResource experimentDataResource;
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
@@ -37,21 +34,19 @@ public class ExperimentDataResourceTest 
     private WorkflowDataResource workflowDataResource;
     private ExperimentMetadataResource experimentMetadataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
         experimentResource.save();
 
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("exp1");
         experimentDataResource.setUserName(workerResource.getUser());
         experimentDataResource.save();
@@ -68,32 +63,20 @@ public class ExperimentDataResourceTest 
         workflowDataResource.setTemplateName("testWorkflowInstance");
 
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Timestamp currentTime = new Timestamp(d.getTime());
 
         workflowDataResource.setLastUpdatedTime(currentTime);
         workflowDataResource.setStartTime(currentTime);
         workflowDataResource.save();
-
-//        super.setUp();
     }
 
     public void testCreate() throws Exception {
-        WorkflowDataResource resource = (WorkflowDataResource)experimentDataResource.create(ResourceType.WORKFLOW_DATA);
-//        resource.setTemplateName("testTemplate");
-//        resource.setWorkflowInstanceID("testWFInstanceID");
-//        Calendar calender = Calendar.getInstance();
-//        java.util.Date d =  calender.getTime();
-//        Timestamp currentTime = new Timestamp(d.getTime());
-//        resource.setLastUpdatedTime(currentTime);
-//        resource.save();
-
-        ExperimentMetadataResource metadataResource = (ExperimentMetadataResource)experimentDataResource.create(ResourceType.EXPERIMENT_METADATA);
-//        metadataResource.setMetadata("testmetadata");
-//        metadataResource.save();
+        WorkflowDataResource resource = (WorkflowDataResource) experimentDataResource.create(ResourceType.WORKFLOW_DATA);
+        ExperimentMetadataResource metadataResource = (ExperimentMetadataResource) experimentDataResource.create(ResourceType.EXPERIMENT_METADATA);
 
         assertNotNull("workflowdata resource created", resource);
-        assertNotNull("experimemt metadata resource created" , metadataResource);
+        assertNotNull("experimemt metadata resource created", metadataResource);
     }
 
     public void testGet() throws Exception {
@@ -105,14 +88,14 @@ public class ExperimentDataResourceTest 
     }
 
     public void testGetList() throws Exception {
-        assertNotNull("workflow data retrieved successfully" ,experimentDataResource.get(ResourceType.WORKFLOW_DATA));
+        assertNotNull("workflow data retrieved successfully", experimentDataResource.get(ResourceType.WORKFLOW_DATA));
         assertNotNull("experiment meta data retrieved successfully", experimentDataResource.get(ResourceType.EXPERIMENT_METADATA));
     }
 
     public void testSave() throws Exception {
         experimentDataResource.save();
 
-        if (experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testExpID")){
+        if (experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testExpID")) {
             assertTrue("experiment data saved successfully", true);
         }
         //remove experiment data
@@ -121,22 +104,20 @@ public class ExperimentDataResourceTest 
 
     public void testRemove() throws Exception {
         experimentDataResource.remove(ResourceType.WORKFLOW_DATA, "testWFInstanceID");
-        if(!experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testWFInstanceID")) {
+        if (!experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testWFInstanceID")) {
             assertTrue("workflow data resource removed successfully", true);
         }
 
         experimentDataResource.remove(ResourceType.EXPERIMENT_METADATA, "testExpID");
-        if (! experimentDataResource.isExists(ResourceType.EXPERIMENT_METADATA, "testExpID")) {
+        if (!experimentDataResource.isExists(ResourceType.EXPERIMENT_METADATA, "testExpID")) {
             assertTrue("experiment meta data resource removed successfully", true);
         }
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 
 
-
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentMetadataResourceTest.java Fri Oct 12 13:52:28 2012
@@ -22,44 +22,38 @@
 package org.apache.airavata.persistance.registry.jpa;
 
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class ExperimentMetadataResourceTest extends TestCase {
+public class ExperimentMetadataResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
     private WorkerResource workerResource;
     private ExperimentDataResource experimentDataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
 
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentDate = new Date(d.getTime());
         experimentResource.setSubmittedDate(currentDate);
         experimentResource.save();
 
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("testExp");
         experimentDataResource.setUserName(workerResource.getUser());
         experimentDataResource.save();
-
-//        super.setUp();
     }
 
     public void testSave() throws Exception {
@@ -68,8 +62,8 @@ public class ExperimentMetadataResourceT
         experimentMetadataResource.setMetadata("testMetadata");
         experimentMetadataResource.save();
 
-        if(experimentDataResource.isExists(ResourceType.EXPERIMENT_METADATA, "testExpID")){
-            assertTrue("experiment meta data saved successfully" , true);
+        if (experimentDataResource.isExists(ResourceType.EXPERIMENT_METADATA, "testExpID")) {
+            assertTrue("experiment meta data saved successfully", true);
         }
 
         //remove the metadata
@@ -77,8 +71,7 @@ public class ExperimentMetadataResourceT
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ExperimentResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,42 +21,36 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class ExperimentResourceTest extends TestCase {
+public class ExperimentResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
     private WorkerResource workerResource;
     private ExperimentDataResource experimentDataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentDate = new Date(d.getTime());
         experimentResource.setSubmittedDate(currentDate);
         experimentResource.save();
-
-//        super.setUp();
     }
 
-    public void testCreate() throws Exception{
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+    public void testCreate() throws Exception {
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("testExp");
         experimentDataResource.setUserName(workerResource.getUser());
         assertNotNull("experiment data resource has being created ", experimentDataResource);
@@ -71,23 +65,22 @@ public class ExperimentResourceTest exte
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
         experimentResource.save();
 
-        if(gatewayResource.isExists(ResourceType.EXPERIMENT, "testExpID")){
+        if (gatewayResource.isExists(ResourceType.EXPERIMENT, "testExpID")) {
             assertTrue("experiment save successfully", true);
         }
         //remove experiment
         gatewayResource.remove(ResourceType.EXPERIMENT, "testExpID");
     }
 
-    public void testRemove () throws Exception {
-         experimentResource.remove(ResourceType.EXPERIMENT_DATA, "testExpID");
-        if(!experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testExpID")){
+    public void testRemove() throws Exception {
+        experimentResource.remove(ResourceType.EXPERIMENT_DATA, "testExpID");
+        if (!experimentResource.isExists(ResourceType.EXPERIMENT_DATA, "testExpID")) {
             assertTrue("experiment data removed successfully", true);
         }
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GatewayResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,52 +21,41 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
 
-public class GatewayResourceTest extends TestCase {
+public class GatewayResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ProjectResource projectResource;
     private UserResource userResource;
     private WorkerResource workerResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.createGateway("gateway1");
-        if(gatewayResource == null){
-            gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
+        userResource = super.getUserResource();
+        if (gatewayResource == null) {
+            gatewayResource = (GatewayResource) ResourceUtils.getGateway("gateway1");
         }
-        projectResource = (ProjectResource)gatewayResource.create(ResourceType.PROJECT);
-        userResource = (UserResource)gatewayResource.create(ResourceType.USER);
-        workerResource = (WorkerResource)gatewayResource.create(ResourceType.GATEWAY_WORKER);
-
-        userResource.setUserName("testUser");
-        userResource.setPassword("testUser");
-        userResource.save();
-
-        workerResource.setUser("testUser");
-        workerResource.save();
+        projectResource = (ProjectResource) gatewayResource.create(ResourceType.PROJECT);
 
         projectResource.setName("testProject");
         projectResource.setWorker(workerResource);
         projectResource.save();
     }
 
-     @org.junit.Test
+    @org.junit.Test
     public void testSave() throws Exception {
         gatewayResource.setOwner("owner1");
         gatewayResource.save();
 
         boolean gatewayExist = ResourceUtils.isGatewayExist("gateway1");
-        if(gatewayExist){
+        if (gatewayExist) {
             assertTrue("The gateway exisits", gatewayExist);
         }
 
@@ -75,12 +64,12 @@ public class GatewayResourceTest extends
     @org.junit.Test
     public void testCreate() throws Exception {
 
-        PublishWorkflowResource publishWorkflowResource = (PublishWorkflowResource)gatewayResource.create(ResourceType.PUBLISHED_WORKFLOW);
-        UserWorkflowResource userWorkflowResource = (UserWorkflowResource)gatewayResource.create(ResourceType.USER_WORKFLOW);
-        HostDescriptorResource hostDescriptorResource = (HostDescriptorResource)gatewayResource.create(ResourceType.HOST_DESCRIPTOR);
-        ServiceDescriptorResource serviceDescriptorResource = (ServiceDescriptorResource)gatewayResource.create(ResourceType.SERVICE_DESCRIPTOR);
-        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource)gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
-        ExperimentResource experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        PublishWorkflowResource publishWorkflowResource = (PublishWorkflowResource) gatewayResource.create(ResourceType.PUBLISHED_WORKFLOW);
+        UserWorkflowResource userWorkflowResource = (UserWorkflowResource) gatewayResource.create(ResourceType.USER_WORKFLOW);
+        HostDescriptorResource hostDescriptorResource = (HostDescriptorResource) gatewayResource.create(ResourceType.HOST_DESCRIPTOR);
+        ServiceDescriptorResource serviceDescriptorResource = (ServiceDescriptorResource) gatewayResource.create(ResourceType.SERVICE_DESCRIPTOR);
+        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource) gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
+        ExperimentResource experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
 
         hostDescriptorResource.setUserName(workerResource.getUser());
         hostDescriptorResource.setHostDescName("testHostDesc");
@@ -100,7 +89,7 @@ public class GatewayResourceTest extends
         applicationDescriptorResource.save();
 
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         userWorkflowResource.setName("workflow1");
         userWorkflowResource.setLastUpdateDate(currentTime);
@@ -112,7 +101,7 @@ public class GatewayResourceTest extends
         publishWorkflowResource.setCreatedUser("testUser");
         publishWorkflowResource.setContent("testContent");
         Calendar c = Calendar.getInstance();
-        java.util.Date da =  c.getTime();
+        java.util.Date da = c.getTime();
         Date time = new Date(da.getTime());
         publishWorkflowResource.setPublishedDate(time);
         publishWorkflowResource.save();
@@ -184,11 +173,11 @@ public class GatewayResourceTest extends
         gatewayResource.remove(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc");
         assertFalse(gatewayResource.isExists(ResourceType.APPLICATION_DESCRIPTOR, "testAppDesc"));
 
-        PublishWorkflowResource publishWorkflowResource = (PublishWorkflowResource)gatewayResource.create(ResourceType.PUBLISHED_WORKFLOW);
-        HostDescriptorResource hostDescriptorResource = (HostDescriptorResource)gatewayResource.create(ResourceType.HOST_DESCRIPTOR);
-        ServiceDescriptorResource serviceDescriptorResource = (ServiceDescriptorResource)gatewayResource.create(ResourceType.SERVICE_DESCRIPTOR);
-        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource)gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
-        ExperimentResource experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        PublishWorkflowResource publishWorkflowResource = (PublishWorkflowResource) gatewayResource.create(ResourceType.PUBLISHED_WORKFLOW);
+        HostDescriptorResource hostDescriptorResource = (HostDescriptorResource) gatewayResource.create(ResourceType.HOST_DESCRIPTOR);
+        ServiceDescriptorResource serviceDescriptorResource = (ServiceDescriptorResource) gatewayResource.create(ResourceType.SERVICE_DESCRIPTOR);
+        ApplicationDescriptorResource applicationDescriptorResource = (ApplicationDescriptorResource) gatewayResource.create(ResourceType.APPLICATION_DESCRIPTOR);
+        ExperimentResource experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
 
         hostDescriptorResource.setUserName(workerResource.getUser());
         hostDescriptorResource.setHostDescName("testHostDesc");
@@ -208,14 +197,14 @@ public class GatewayResourceTest extends
         applicationDescriptorResource.save();
 
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
 
         publishWorkflowResource.setName("pubworkflow1");
         publishWorkflowResource.setCreatedUser("testUser");
         publishWorkflowResource.setContent("testContent");
         Calendar c = Calendar.getInstance();
-        java.util.Date da =  c.getTime();
+        java.util.Date da = c.getTime();
         Date time = new Date(da.getTime());
         publishWorkflowResource.setPublishedDate(time);
         publishWorkflowResource.save();
@@ -229,8 +218,7 @@ public class GatewayResourceTest extends
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/GramDataResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,50 +21,44 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Timestamp;
 import java.util.Calendar;
 
-public class GramDataResourceTest extends TestCase {
+public class GramDataResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
     private WorkerResource workerResource;
     private ExperimentDataResource experimentDataResource;
     private WorkflowDataResource workflowDataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
         experimentResource.save();
 
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("testExp");
         experimentDataResource.setUserName(workerResource.getUser());
         experimentDataResource.save();
 
-        workflowDataResource = (WorkflowDataResource)experimentDataResource.create(ResourceType.WORKFLOW_DATA);
+        workflowDataResource = (WorkflowDataResource) experimentDataResource.create(ResourceType.WORKFLOW_DATA);
         workflowDataResource.setWorkflowInstanceID("testWFInstance");
         workflowDataResource.setTemplateName("testTemplate");
         workflowDataResource.setExperimentID("testExpID");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Timestamp timestamp = new Timestamp(d.getTime());
         workflowDataResource.setLastUpdatedTime(timestamp);
         workflowDataResource.save();
-
-//        super.setUp();
     }
 
     public void testSave() throws Exception {
@@ -74,7 +68,7 @@ public class GramDataResourceTest extend
         gramDataResource.setRsl("testRSL");
         gramDataResource.save();
 
-        if (workflowDataResource.isGramDataExists("testNodeID"))  {
+        if (workflowDataResource.isGramDataExists("testNodeID")) {
             assertTrue("gram data saved successfully", true);
         }
 
@@ -83,9 +77,8 @@ public class GramDataResourceTest extend
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/HostDescriptorResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,34 +21,29 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.HostDescriptorResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
-public class HostDescriptorResourceTest extends TestCase {
+public class HostDescriptorResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private HostDescriptorResource hostDescriptorResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-//        super.setUp();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
         hostDescriptorResource = gatewayResource.createHostDescriptorResource("testHostDesc");
         hostDescriptorResource.setUserName("testUser");
         hostDescriptorResource.setContent("testContent");
     }
 
-    public void testGetList() throws Exception{
-        assertNotNull("application data being retrieved successfully" ,hostDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
+    public void testGetList() throws Exception {
+        assertNotNull("application data being retrieved successfully", hostDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
     }
 
     public void testSave() throws Exception {
         hostDescriptorResource.save();
-        if(gatewayResource.isHostDescriptorExists("testHostDesc")){
+        if (gatewayResource.isHostDescriptorExists("testHostDesc")) {
             assertTrue("host descriptor saved successfully", true);
         }
         //remove host descriptor
@@ -56,8 +51,7 @@ public class HostDescriptorResourceTest 
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/NodeDataResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,61 +21,54 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Timestamp;
 import java.util.Calendar;
 
-public class NodeDataResourceTest extends TestCase {
+public class NodeDataResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
     private WorkerResource workerResource;
     private ExperimentDataResource experimentDataResource;
     private WorkflowDataResource workflowDataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
         experimentResource.setProject(new ProjectResource(workerResource, gatewayResource, "testProject"));
         experimentResource.save();
 
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("testExp");
         experimentDataResource.setUserName(workerResource.getUser());
         experimentDataResource.save();
 
-        workflowDataResource = (WorkflowDataResource)experimentDataResource.create(ResourceType.WORKFLOW_DATA);
+        workflowDataResource = (WorkflowDataResource) experimentDataResource.create(ResourceType.WORKFLOW_DATA);
         workflowDataResource.setWorkflowInstanceID("testWFInstance");
         workflowDataResource.setTemplateName("testTemplate");
         workflowDataResource.setExperimentID("testExpID");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Timestamp timestamp = new Timestamp(d.getTime());
         workflowDataResource.setLastUpdatedTime(timestamp);
         workflowDataResource.save();
-
-//        super.setUp();
     }
 
     public void testSave() throws Exception {
         NodeDataResource nodeDataResource = workflowDataResource.createNodeData("testNodeID");
         nodeDataResource.setInputs("testInput");
 
-//        nodeDataResource.setWorkflowDataResource(workflowDataResource);
         nodeDataResource.setStatus("testStatus");
         nodeDataResource.save();
 
-        if(workflowDataResource.isNodeExists("testNodeID")){
+        if (workflowDataResource.isNodeExists("testNodeID")) {
             assertTrue("node data resource saved successfully", true);
         }
         //remove node data
@@ -83,9 +76,8 @@ public class NodeDataResourceTest extend
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ProjectResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ProjectResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ProjectResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ProjectResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,30 +21,26 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.ExperimentResource;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.ProjectResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class ProjectResourceTest extends TestCase {
+public class ProjectResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private WorkerResource workerResource;
     private ProjectResource projectResource;
     private ExperimentResource experimentResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
-        projectResource =  workerResource.createProject("testProject");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
+        projectResource = workerResource.createProject("testProject");
         projectResource.setGateway(gatewayResource);
         projectResource.setWorker(workerResource);
         projectResource.save();
@@ -55,7 +51,7 @@ public class ProjectResourceTest extends
         experimentResource.setGateway(gatewayResource);
         experimentResource.setWorker(workerResource);
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         experimentResource.setSubmittedDate(currentTime);
         experimentResource.setProject(projectResource);
@@ -68,14 +64,14 @@ public class ProjectResourceTest extends
         assertNotNull("experiment resource retrieved successfully", experiment);
     }
 
-     public void testGetList() throws Exception {
-         assertNotNull("experiment resources retrieved successfully", projectResource.getExperiments());
-     }
+    public void testGetList() throws Exception {
+        assertNotNull("experiment resources retrieved successfully", projectResource.getExperiments());
+    }
 
     public void testSave() throws Exception {
         projectResource.save();
 
-        if(workerResource.isProjectExists("testProject")){
+        if (workerResource.isProjectExists("testProject")) {
             assertTrue("Project saved successfully", true);
         }
         //remove project
@@ -85,14 +81,13 @@ public class ProjectResourceTest extends
 
     public void testRemove() throws Exception {
         projectResource.removeExperiment("testExpID");
-        if(!projectResource.isExperimentExists("testExpID")) {
+        if (!projectResource.isExperimentExists("testExpID")) {
             assertTrue("experiment removed successfully", true);
         }
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/PublishWorkflowResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/PublishWorkflowResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/PublishWorkflowResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/PublishWorkflowResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,36 +21,32 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.PublishWorkflowResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class PublishWorkflowResourceTest extends TestCase {
+public class PublishWorkflowResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private PublishWorkflowResource publishWorkflowResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
         publishWorkflowResource = gatewayResource.createPublishedWorkflow("workflow1");
         publishWorkflowResource.setCreatedUser("testUser");
         publishWorkflowResource.setContent("testContent");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         publishWorkflowResource.setPublishedDate(currentTime);
     }
 
     public void testSave() throws Exception {
         publishWorkflowResource.save();
-        if(gatewayResource.isPublishedWorkflowExists("workflow1")){
+        if (gatewayResource.isPublishedWorkflowExists("workflow1")) {
             assertTrue("published workflow saved successfully", true);
         }
         //remove workflow
@@ -58,8 +54,7 @@ public class PublishWorkflowResourceTest
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/ServiceDescriptorResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,33 +21,29 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.ServiceDescriptorResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
-public class ServiceDescriptorResourceTest extends TestCase {
+public class ServiceDescriptorResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ServiceDescriptorResource serviceDescriptorResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
         serviceDescriptorResource = gatewayResource.createServiceDescriptorResource("testServiceDesc");
         serviceDescriptorResource.setUserName("testUser");
         serviceDescriptorResource.setContent("testContent");
     }
 
-    public void testGetList() throws Exception{
-        assertNotNull("application data being retrieved successfully" ,serviceDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
+    public void testGetList() throws Exception {
+        assertNotNull("application data being retrieved successfully", serviceDescriptorResource.get(ResourceType.APPLICATION_DESCRIPTOR));
     }
 
     public void testSave() throws Exception {
         serviceDescriptorResource.save();
-        if(gatewayResource.isServiceDescriptorExists("testServiceDesc")){
+        if (gatewayResource.isServiceDescriptorExists("testServiceDesc")) {
             assertTrue("service descriptor saved successfully", true);
         }
         //remove host descriptor
@@ -55,8 +51,8 @@ public class ServiceDescriptorResourceTe
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
+
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,30 +21,23 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.UserResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
-public class UserResourceTest extends TestCase {
+public class UserResourceTest extends AbstractResourceTest {
     private UserResource userResource;
     private GatewayResource gatewayResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        userResource = (UserResource)gatewayResource.create(ResourceType.USER);
-        userResource.setUserName("testUser");
-        userResource.setPassword("testPassword");
-//        super.setUp();
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        userResource = super.getUserResource();
     }
 
     public void testSave() throws Exception {
         userResource.save();
-        if(gatewayResource.isExists(ResourceType.USER, "testUser")) {
+        if (gatewayResource.isExists(ResourceType.USER, "testUser")) {
             assertTrue("user resource saved successfully", true);
         }
         //remove user
@@ -52,8 +45,7 @@ public class UserResourceTest extends Te
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserWorkflowResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserWorkflowResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserWorkflowResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/UserWorkflowResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,41 +21,36 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;
 import org.apache.airavata.persistance.registry.jpa.resources.UserWorkflowResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class UserWorkflowResourceTest extends TestCase {
+public class UserWorkflowResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private WorkerResource workerResource;
     private UserWorkflowResource userWorkflowResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        userWorkflowResource =  workerResource.createWorkflowTemplate("workflow1");
+        userWorkflowResource = workerResource.createWorkflowTemplate("workflow1");
         userWorkflowResource.setGateway(gatewayResource);
         userWorkflowResource.setContent("testContent");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         userWorkflowResource.setLastUpdateDate(currentTime);
-//        super.setUp();
     }
 
     public void testSave() throws Exception {
         userWorkflowResource.save();
-        if(workerResource.isWorkflowTemplateExists("workflow1")){
+        if (workerResource.isWorkflowTemplateExists("workflow1")) {
             assertTrue("user workflow saved successfully", true);
         }
         //remove user workflow
@@ -63,8 +58,7 @@ public class UserWorkflowResourceTest ex
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 }

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkerResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkerResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkerResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkerResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,37 +21,28 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Date;
 import java.util.Calendar;
 
-public class WorkerResourceTest extends TestCase {
+public class WorkerResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private WorkerResource workerResource;
     private UserResource userResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = new WorkerResource();
-        workerResource.setGateway(gatewayResource);
-        workerResource.setUser("testUser");
-        userResource = (UserResource)gatewayResource.create(ResourceType.USER);
-        userResource.setUserName("testUser");
-        userResource.setPassword("testPassword");
-        userResource.save();
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
+        userResource = super.getUserResource();
     }
 
     public void testCreate() throws Exception {
         ProjectResource testProject = workerResource.createProject("testProject");
         UserWorkflowResource userWorkflowResource = workerResource.createWorkflowTemplate("workflow1");
-        ExperimentResource experimentResource = (ExperimentResource)workerResource.create(ResourceType.EXPERIMENT);
+        ExperimentResource experimentResource = (ExperimentResource) workerResource.create(ResourceType.EXPERIMENT);
 
         testProject.setGateway(gatewayResource);
         testProject.save();
@@ -64,7 +55,7 @@ public class WorkerResourceTest extends 
         experimentResource.setExpID("testExpID");
         experimentResource.setProject(testProject);
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Date currentTime = new Date(d.getTime());
         experimentResource.setSubmittedDate(currentTime);
         experimentResource.save();
@@ -74,13 +65,13 @@ public class WorkerResourceTest extends 
     }
 
     public void testGet() throws Exception {
-        assertNotNull("project resource retrieved successfully" ,workerResource.get(ResourceType.PROJECT, "testProject"));
+        assertNotNull("project resource retrieved successfully", workerResource.get(ResourceType.PROJECT, "testProject"));
         assertNotNull("user workflow retrieved successfully", workerResource.get(ResourceType.USER_WORKFLOW, "workflow1"));
         assertNotNull("experiment retrieved successfully", workerResource.get(ResourceType.EXPERIMENT, "testExpID"));
     }
 
     public void testGetList() throws Exception {
-        assertNotNull("project resources retrieved successfully" ,workerResource.get(ResourceType.PROJECT));
+        assertNotNull("project resources retrieved successfully", workerResource.get(ResourceType.PROJECT));
         assertNotNull("user workflows retrieved successfully", workerResource.get(ResourceType.USER_WORKFLOW));
         assertNotNull("experiments retrieved successfully", workerResource.get(ResourceType.EXPERIMENT));
 
@@ -88,7 +79,7 @@ public class WorkerResourceTest extends 
 
     public void testSave() throws Exception {
         workerResource.save();
-        if(gatewayResource.isExists(ResourceType.USER, "testUser")){
+        if (gatewayResource.isExists(ResourceType.USER, "testUser")) {
             assertTrue("worker resource saved successfully", true);
         }
         //remove
@@ -101,24 +92,23 @@ public class WorkerResourceTest extends 
         workerResource.removeWorkflowTemplate("workflow1");
         workerResource.removeExperiment("testExpID");
 
-        if(!workerResource.isProjectExists("testProject")){
+        if (!workerResource.isProjectExists("testProject")) {
             assertTrue("project has been removed successfully", true);
         }
 
-        if(!workerResource.isExperimentExists("testExpID")){
+        if (!workerResource.isExperimentExists("testExpID")) {
             assertTrue("experiment has been removed successfully", true);
         }
 
-        if(!workerResource.isWorkflowTemplateExists("workflow1")){
+        if (!workerResource.isWorkflowTemplateExists("workflow1")) {
             assertTrue("user workflow has been removed successfully", true);
         }
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 
 
-    }
+}

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java?rev=1397565&r1=1397564&r2=1397565&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/test/java/org/apache/airavata/persistance/registry/jpa/WorkflowDataResourceTest.java Fri Oct 12 13:52:28 2012
@@ -21,47 +21,41 @@
 
 package org.apache.airavata.persistance.registry.jpa;
 
-import junit.framework.TestCase;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
-import org.apache.airavata.persistance.registry.jpa.util.Initialize;
 
 import java.sql.Timestamp;
 import java.util.Calendar;
 
-public class WorkflowDataResourceTest extends TestCase {
+public class WorkflowDataResourceTest extends AbstractResourceTest {
     private GatewayResource gatewayResource;
     private ExperimentResource experimentResource;
     private WorkerResource workerResource;
     private ExperimentDataResource experimentDataResource;
     private WorkflowDataResource workflowDataResource;
 
-    private Initialize initialize ;
     @Override
     public void setUp() throws Exception {
-        initialize = new Initialize();
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource)ResourceUtils.getGateway("gateway1");
-        workerResource = (WorkerResource)ResourceUtils.getWorker(gatewayResource.getGatewayName(), "testUser");
+        super.setUp();
+        gatewayResource = super.getGatewayResource();
+        workerResource = super.getWorkerResource();
 
-        experimentResource = (ExperimentResource)gatewayResource.create(ResourceType.EXPERIMENT);
+        experimentResource = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
         experimentResource.setExpID("testExpID");
         experimentResource.setWorker(workerResource);
 
-        experimentDataResource = (ExperimentDataResource)experimentResource.create(ResourceType.EXPERIMENT_DATA);
+        experimentDataResource = (ExperimentDataResource) experimentResource.create(ResourceType.EXPERIMENT_DATA);
         experimentDataResource.setExpName("testExp");
         experimentDataResource.setUserName(workerResource.getUser());
         experimentDataResource.save();
 
-        workflowDataResource = (WorkflowDataResource)experimentDataResource.create(ResourceType.WORKFLOW_DATA);
+        workflowDataResource = (WorkflowDataResource) experimentDataResource.create(ResourceType.WORKFLOW_DATA);
         workflowDataResource.setWorkflowInstanceID("testWFInstance");
         workflowDataResource.setTemplateName("testTemplate");
         workflowDataResource.setExperimentID("testExpID");
         Calendar calender = Calendar.getInstance();
-        java.util.Date d =  calender.getTime();
+        java.util.Date d = calender.getTime();
         Timestamp timestamp = new Timestamp(d.getTime());
         workflowDataResource.setLastUpdatedTime(timestamp);
-
-//        super.setUp();
     }
 
     public void testCreate() throws Exception {
@@ -95,25 +89,24 @@ public class WorkflowDataResourceTest ex
     public void testRemove() throws Exception {
         workflowDataResource.removeNodeData("testNodeID");
         workflowDataResource.removeGramData("testNodeID");
-        if(!workflowDataResource.isNodeExists("testNodeID")){
-           assertTrue("node date removed successfully", true);
+        if (!workflowDataResource.isNodeExists("testNodeID")) {
+            assertTrue("node date removed successfully", true);
         }
-        if(!workflowDataResource.isGramDataExists("testNodeID")){
+        if (!workflowDataResource.isGramDataExists("testNodeID")) {
             assertTrue("gram date removed successfully", true);
         }
     }
 
     public void testSave() throws Exception {
         workflowDataResource.save();
-        if(experimentDataResource.isWorkflowInstancePresent("testWFInstance")){
+        if (experimentDataResource.isWorkflowInstancePresent("testWFInstance")) {
             assertTrue("workflow data saved successfully", true);
         }
     }
 
     @Override
-    protected void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-//        super.tearDown();    //To change body of overridden methods use File | Settings | File Templates.
+    public void tearDown() throws Exception {
+        super.tearDown();
     }
 
 



Mime
View raw message