removing tests since they have moved to eu.etaxonomy.taxeditor.remoting
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 6 Oct 2014 15:03:27 +0000 (15:03 +0000)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 6 Oct 2014 15:03:27 +0000 (15:03 +0000)
.gitattributes
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmApplicationRemoteControllerTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmPersistentRemoteSourceTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmRemoteSourceTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmServiceCacherTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/HttpInvokerServicesTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteApplicationConfigurationTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteLazyLoadingTest.java [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemotePersistentCollectionTest.java [deleted file]

index 97e2c4334b0290ed31278bd5b029b17c04e7821f..e0d01342009f5091199e364134befb52ee4fca00 100644 (file)
@@ -341,14 +341,6 @@ eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/localApplicati
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmApplicationRemoteControllerTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmPersistentRemoteSourceTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmRemoteSourceTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmServiceCacherTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/HttpInvokerServicesTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteApplicationConfigurationTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteLazyLoadingTest.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemotePersistentCollectionTest.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
 eu.etaxonomy.taxeditor.editor/.classpath -text
 eu.etaxonomy.taxeditor.editor/.project -text
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmApplicationRemoteControllerTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmApplicationRemoteControllerTest.java
deleted file mode 100644 (file)
index 38782d8..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-import java.io.FileNotFoundException;
-import java.util.List;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-import org.springframework.remoting.RemoteConnectFailureException;
-import org.unitils.UnitilsJUnit4;
-
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.remote.CdmRemoteSource;
-
-
-/**
- * Class to test the {@link CdmApplicationRemoteController}
- *
- */
-public class CdmApplicationRemoteControllerTest extends UnitilsJUnit4 {
-       private static final Logger logger = Logger.getLogger(CdmApplicationRemoteControllerTest.class);
-
-       
-       @BeforeClass
-       public static void initialize() {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               
-       }
-       
-       @Test
-       public void whenInitializingControllerWithDefaultContextThenSucceed() {
-               CdmRemoteSource remoteSource = CdmRemoteSource.NewInstance("local", "127.0.0.1", 8080, "", NomenclaturalCode.ICNAFP);
-               CdmApplicationRemoteController controller = 
-                               CdmApplicationRemoteController.NewInstance(remoteSource, 
-                                               false, 
-                                               null, 
-                                               null);
-               controller = 
-                               CdmApplicationRemoteController.NewInstance(CdmApplicationRemoteController.DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
-                                               remoteSource, 
-                                               false, 
-                                               null, 
-                                               null);
-       }
-       
-       @Test
-       public void whenInitializingControllerWithInvalidContextThenFail() {
-               CdmRemoteSource remoteSource = CdmRemoteSource.NewInstance("local", "127.0.0.1", 8080, "", NomenclaturalCode.ICNAFP);
-               Resource wrongResource = 
-                               new ClassPathResource("/eu/etaxonomy/cdm/wrongRemotingApplicationContext.xml");
-               try {
-                       CdmApplicationRemoteController controller = 
-                                       CdmApplicationRemoteController.NewInstance(wrongResource,
-                                                       remoteSource, 
-                                                       false, 
-                                                       null, 
-                                                       null);
-                       Assert.fail("Remote controller should fail when initialised with an invalid context file");
-               } catch(RuntimeException re) {
-                       Throwable t = re.getCause();
-                       if(t instanceof FileNotFoundException) {
-                               logger.info(t.getClass().getCanonicalName() + " : " + t.getMessage());
-                       } else {
-                               throw re;
-                       }
-               }
-
-       }
-
-       
-       @Test
-       public void whenConnectingToAnActiveServerThenSucceed() {
-               CdmRemoteSource remoteSource = CdmRemoteSource.NewInstance("local", "127.0.0.1", 8080, "", NomenclaturalCode.ICNAFP);
-               CdmApplicationRemoteController controller = 
-                               CdmApplicationRemoteController.NewInstance(remoteSource, 
-                                               false, 
-                                               null, 
-                                               null);
-               // call any service to check if the connection worked
-               IClassificationService classificationService= controller.getClassificationService();
-               List<Classification> classifications = classificationService.listClassifications(1,0,null,null);        
-               Assert.assertTrue("We should have at least one classification",classifications.size() > 0);
-               
-       }
-       
-       @Test
-       public void whenConnectingToInactiveServerThenFail() {
-               CdmRemoteSource remoteSource = CdmRemoteSource.NewInstance("local", "127.0.0.1", 8090, "", NomenclaturalCode.ICNAFP);
-
-               CdmApplicationRemoteController controller = 
-                               CdmApplicationRemoteController.NewInstance(remoteSource, 
-                                               false, 
-                                               null, 
-                                               null);
-
-
-               // call any service to check if the connection worked
-               try {
-                       IClassificationService classificationService= controller.getClassificationService();
-                       List<Classification> classifications = classificationService.listClassifications(1,0,null,null);        
-                       Assert.fail("Calling remote service should fail when connecting to an inactive CDM Server");
-               } catch(RemoteConnectFailureException rcfe) {
-
-               }
-
-       }       
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmPersistentRemoteSourceTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmPersistentRemoteSourceTest.java
deleted file mode 100644 (file)
index c601d3a..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-
-import java.util.Map;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.unitils.UnitilsJUnit4;
-
-import static org.hamcrest.CoreMatchers.*;
-
-import eu.etaxonomy.cdm.config.CdmPersistentSourceUtils;
-import eu.etaxonomy.cdm.config.CdmPersistentXMLSource.CdmSourceProperties;
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.remote.CdmPersistentRemoteSource;
-import eu.etaxonomy.cdm.remote.CdmRemoteSource;
-import eu.etaxonomy.cdm.remote.CdmRemoteSourceException;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
-
-/**
- * Class to test the cdm persistent source functionality, including
- * initialising / saving / updating and deleting 
- * 
- * Corresponding test sources settings can be found at 
- * /src/text/resources/eu.etaxonomy.cdm/cdm.datasources.xml
- *
- */
-public class CdmPersistentRemoteSourceTest extends UnitilsJUnit4 {
-       private static final Logger logger = Logger.getLogger(CdmPersistentRemoteSourceTest.class);
-       
-       private CdmPersistentRemoteSource remotePersistentSource;
-
-       @BeforeClass
-       public static void initialize() {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               
-       }
-       
-       @Test
-       public void whenLoadingExistingCompleteRemoteSourceThenLoadIsSuccessful() {
-
-               try {
-                       remotePersistentSource = CdmPersistentRemoteSource.NewInstance("default");
-
-                       String expectedServer = "127.0.0.1";
-                       String expectedPort = "8080";
-                       String expectedContextPath = "";
-                       logger.info("Default remote source server : " + remotePersistentSource.getServer());
-                       Assert.assertTrue("Default server should be " + expectedServer,
-                                       expectedServer.equals(remotePersistentSource.getServer()));
-
-                       logger.info("Default remote source port : " + remotePersistentSource.getPort());
-                       Assert.assertTrue("Default port should be " + 8080,
-                                       expectedPort.equals(String.valueOf(remotePersistentSource.getPort())));
-
-                       logger.info("Default remote source context path : " + remotePersistentSource.getContextPath());
-                       Assert.assertTrue("Default remote source context path should be " + expectedContextPath, 
-                                       expectedContextPath.equals(remotePersistentSource.getContextPath()));
-                       
-                       logger.info("Default remote source nomenclatural code : " + remotePersistentSource.getNomenclaturalCode().toString());
-                       Assert.assertTrue("Default NomenclaturalCode should be ICNAFP", 
-                                       NomenclaturalCode.ICNAFP.equals(remotePersistentSource.getNomenclaturalCode()));
-                       
-               } catch (CdmRemoteSourceException e) {
-                       Assert.fail("Initialising an existing remote source should not throw an exception");
-               }                       
-       }
-       
-
-       
-       
-       @Test
-       public void whenConnectingToAnActiveServerThenConnectSuccessfully() {
-               // check if active server throws the right exception
-               try {
-                       remotePersistentSource = CdmPersistentRemoteSource.NewInstance("default");
-
-                       String dbSchemaVersion = "";
-                       try {
-                               dbSchemaVersion = remotePersistentSource.getDbSchemaVersion();
-                       } catch (CdmSourceException e) {
-                               Assert.fail("getDbSchemaVersion() on active cdm server should not have thrown CdmSourceException");
-                       }
-                       logger.info("dbSchemaVersion is " + dbSchemaVersion);
-
-
-                       boolean isDbEmpty = false;
-                       try {
-                               isDbEmpty = remotePersistentSource.isDbEmpty();
-                       } catch (CdmSourceException e) {
-                               Assert.fail("isDbEmpty() on active cdm server should not have thrown CdmSourceException");
-                       }
-                       Assert.assertFalse(isDbEmpty);
-
-
-                       boolean check = false;
-                       try {
-                               check = remotePersistentSource.checkConnection();
-                       } catch (CdmSourceException e) {
-                               Assert.fail("checkConnection() on active cdm server should not have thrown CdmSourceException");
-                       }
-                       Assert.assertTrue(check);
-               } catch (CdmRemoteSourceException e1) {
-                       // TODO Auto-generated catch block
-                       e1.printStackTrace();
-               }
-               
-       }
-       
-       @Test
-       public void whenRequestingMetadatFromRemoteSourceThenMetaDataIsRetrieved() {
-               try {
-                       remotePersistentSource = CdmPersistentRemoteSource.NewInstance("default");
-                       Map<MetaDataPropertyName, String> cdmMetaDataMap = remotePersistentSource.getMetaDataMap();
-                       for(MetaDataPropertyName mdpn : cdmMetaDataMap.keySet()) {
-                               String value = cdmMetaDataMap.get(mdpn);
-                               logger.info("MetaData Property " + mdpn.name() + " has value " + value);
-                               Assert.assertNotNull("Meta Data Value for property for " + mdpn.name() + " should not be null", value);                         
-                       }
-                       
-               } catch (CdmRemoteSourceException e) {
-                       Assert.fail("Initialising an existing remote source should not throw an exception");
-               } catch (CdmSourceException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-       
-       @Test
-       public void whenLoadingNonExistingRemoteSourceThenThrowException() {
-               try {
-                       remotePersistentSource = CdmPersistentRemoteSource.NewInstance("nonExistingSource");
-                       Assert.fail("Initialising a non-existing remote source should throw an exception");
-               } catch (CdmRemoteSourceException e) {
-                       logger.info(e.getMessage());
-               }       
-       }
-       
-       @Test
-       public void whenLoadingExistingIncompleteRemoteSourceThenThrowException() {
-               try {
-                       remotePersistentSource = CdmPersistentRemoteSource.NewInstance("incomplete");
-                       Assert.fail("Initialising an incomplete remote source should throw an exception");
-               } catch (CdmRemoteSourceException e) {
-                       Assert.assertThat(e.getMessage(), containsString("Required property '" + CdmSourceProperties.SERVER.toString() + "' is missing"));
-               }       
-       }
-       
-       @Test
-       public void whenSavingUpdatingDeletingNewCompleteRemoteSourceThenSaveUpdateDeleteIsSuccessful() {
-               String strRemoteSource = "local";
-               Assert.assertFalse("New remote source '" + strRemoteSource + "' should not yet exist in source settings file",
-                               CdmPersistentRemoteSource.exists(strRemoteSource));
-               try {
-                       ICdmRemoteSource remoteSource = 
-                                       CdmRemoteSource.NewInstance(strRemoteSource, 
-                                                       "127.0.0.1", 
-                                                       8080, 
-                                                       "col", 
-                                                       NomenclaturalCode.ICNAFP); 
-                       remotePersistentSource = CdmPersistentRemoteSource.save(strRemoteSource,remoteSource);
-                       
-                       logger.info("Server : " + remotePersistentSource.getServer());
-                       Assert.assertTrue("Server value should be equal",
-                                       remoteSource.getServer().equals(remotePersistentSource.getServer()));
-                       
-                       logger.info("Port : " + remotePersistentSource.getPort());
-                       Assert.assertTrue("Port value should be equal",
-                                       remoteSource.getPort() == remotePersistentSource.getPort());
-                       
-                       logger.info("Context Path : " + remotePersistentSource.getContextPath());
-                       Assert.assertTrue("Context Path value should be equal",
-                                       remoteSource.getContextPath().equals(remotePersistentSource.getContextPath()));
-                       
-                       logger.info("Nomenclatural Code : " + remotePersistentSource.getNomenclaturalCode().name());
-                       Assert.assertTrue("Nomenclatural Code value should be equal",
-                                       remoteSource.getNomenclaturalCode().name().equals(remotePersistentSource.getNomenclaturalCode().name()));
-                       
-                       Assert.assertTrue("New remote source '" + strRemoteSource + "' should be saved in source settings file",
-                                       CdmPersistentRemoteSource.exists(strRemoteSource));
-                       
-                       remoteSource = CdmRemoteSource.NewInstance(strRemoteSource, 
-                                       "127.0.0.55", 
-                                       9090, 
-                                       "cyprus", 
-                                       NomenclaturalCode.ICNB); 
-                       remotePersistentSource = CdmPersistentRemoteSource.update(strRemoteSource,remoteSource);
-                       
-                       logger.info("Server : " + remotePersistentSource.getServer());
-                       Assert.assertTrue("Server value should be equal",
-                                       remoteSource.getServer().equals(remotePersistentSource.getServer()));
-                       
-                       logger.info("Port : " + remotePersistentSource.getPort());
-                       Assert.assertTrue("Port value should be equal",
-                                       remoteSource.getPort() == remotePersistentSource.getPort());
-                       
-                       logger.info("Context Path : " + remotePersistentSource.getContextPath());
-                       Assert.assertTrue("Context Path value should be equal",
-                                       remoteSource.getContextPath().equals(remotePersistentSource.getContextPath()));
-                       
-                       logger.info("Nomenclatural Code : " + remotePersistentSource.getNomenclaturalCode().name());
-                       Assert.assertTrue("Nomenclatural Code value should be equal",
-                                       remoteSource.getNomenclaturalCode().name().equals(remotePersistentSource.getNomenclaturalCode().name()));
-                       
-                       Assert.assertTrue("New remote source '" + strRemoteSource + "' should be saved in source settings file",
-                                       CdmPersistentRemoteSource.exists(strRemoteSource));
-                       
-                       CdmPersistentSourceUtils.delete(remotePersistentSource);
-                       
-                       Assert.assertFalse("New remote source '" + strRemoteSource + "' should no longer exist in source settings file",
-                                       CdmPersistentRemoteSource.exists(strRemoteSource));
-                                                                       
-               } catch (CdmRemoteSourceException e) {
-                       Assert.fail("Saving a new complete remote source should not throw an exception");
-                       logger.info(e.getMessage());
-               }       
-       }
-       
-
-
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmRemoteSourceTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmRemoteSourceTest.java
deleted file mode 100644 (file)
index 096f660..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.springframework.remoting.RemoteAccessException;
-import org.unitils.UnitilsJUnit4;
-
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.remote.CdmRemoteSource;
-
-public class CdmRemoteSourceTest extends UnitilsJUnit4 {
-       private static final Logger logger = Logger.getLogger(RemotePersistentCollectionTest.class);
-
-       
-       @BeforeClass
-       public static void initialize() {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               
-       }
-       
-       @Test
-       public void whenConnectingToInactiveServerThenFailToConnect() {
-               // check if non-active server throws the right exception
-               CdmRemoteSource inactiveCrs = CdmRemoteSource.NewInstance("local", "127.0.0.1", 808080, "", NomenclaturalCode.ICNAFP);
-               try {
-                       inactiveCrs.getDbSchemaVersion();
-                       Assert.fail("getDbSchemaVersion() on inactive cdm server should have thrown RemoteAccessException");
-               } catch(CdmSourceException cse) {
-                       Assert.fail("getDbSchemaVersion() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
-               } catch(RemoteAccessException rae){
-                       
-               }
-               
-               try {
-                       inactiveCrs.isDbEmpty();
-                       Assert.fail("isDbEmpty() on inactive cdm server should have thrown RemoteAccessException");
-               } catch(CdmSourceException cse) {
-                       Assert.fail("isDbEmpty() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
-               } catch(RemoteAccessException rae){
-                       
-               }
-               
-               try {
-                       inactiveCrs.checkConnection();
-                       Assert.fail("checkConnection() on inactive cdm server should have thrown RemoteAccessException");
-               } catch(CdmSourceException cse) {
-                       Assert.fail("checkConnection() on inactive cdm server should have thrown RemoteAccessException and not CdmSourceException");
-               } catch(RemoteAccessException rae){
-                       
-               }
-               
-       }
-       
-       @Test
-       public void whenConnectingToAnActiveServerWithServicesBlockedThenFailToAccessServices() {
-               
-       }
-       
-       @Test
-       public void whenConnectingToAnActiveServerThenConnectSuccessfully() {
-               // check if active server throws the right exception
-               CdmRemoteSource activeCrs = CdmRemoteSource.NewInstance("local", "127.0.0.1", 8080, "", NomenclaturalCode.ICNAFP);
-               String dbSchemaVersion = "";
-               try {
-                       dbSchemaVersion = activeCrs.getDbSchemaVersion();
-               } catch (CdmSourceException e) {
-                       Assert.fail("getDbSchemaVersion() on active cdm server should not have thrown CdmSourceException");
-               }
-               logger.info("dbSchemaVersion is " + dbSchemaVersion);
-               
-
-               boolean isDbEmpty = false;
-               try {
-                       isDbEmpty = activeCrs.isDbEmpty();
-               } catch (CdmSourceException e) {
-                       Assert.fail("isDbEmpty() on active cdm server should not have thrown CdmSourceException");
-               }
-               Assert.assertFalse(isDbEmpty);
-               
-               
-               boolean check = true;
-               try {
-                       isDbEmpty = activeCrs.checkConnection();
-               } catch (CdmSourceException e) {
-                       Assert.fail("checkConnection() on active cdm server should not have thrown CdmSourceException");
-               }
-               Assert.assertTrue(check);
-               
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmServiceCacherTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/CdmServiceCacherTest.java
deleted file mode 100644 (file)
index a8564a5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package eu.etaxonomy.taxeditor.remoting;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
-import eu.etaxonomy.cdm.model.common.Language;
-
-public class CdmServiceCacherTest extends RemoteApplicationConfigurationTest {
-       private static final Logger logger = Logger.getLogger(CdmServiceCacherTest.class);
-       
-       
-       private static CdmServiceCacher cdmServiceCacher;
-       
-       @BeforeClass
-       public static void initialize() {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               cdmServiceCacher = (CdmServiceCacher)applicationController.getBean("cdmServiceCacher");
-       }
-       
-       @Test
-       public void testLanguageCache() {
-               Language defaultLanguage = Language.getDefaultLanguage();       
-               
-               Language defaultLanguageInCache = (Language)cdmServiceCacher.getFromCache(defaultLanguage.getUuid());
-               Assert.assertEquals("Loaded Language Term should match Language Term in Cache",defaultLanguage,defaultLanguageInCache);         
-               
-               Language language = Language.getLanguageFromUuid(Language.uuidFrench);
-               Language languageInCache = (Language)cdmServiceCacher.getFromCache(language.getUuid());
-               Assert.assertEquals("Loaded Language Term should match Language Term in Cache",language,languageInCache);
-               
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/HttpInvokerServicesTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/HttpInvokerServicesTest.java
deleted file mode 100644 (file)
index 6bd0959..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.Test;
-
-import eu.etaxonomy.cdm.config.CdmSourceException;
-
-/**
- * Class to test the HttpInvoker services exposed by the CDM Sever
- *
- */
-public class HttpInvokerServicesTest extends RemoteApplicationConfigurationTest {
-       private static final Logger logger = Logger.getLogger(HttpInvokerServicesTest.class);
-       
-       @Test
-       public void whenCallingMethodsOnRemoteServicesThenSuceed() {
-               try {
-                       String dbSchemaVersion = applicationController.getDatabaseService().getDbSchemaVersion();
-                       logger.info("dbSchemaVersion is " + dbSchemaVersion);
-               } catch (CdmSourceException e) {
-                       Assert.fail("pinging database service on active cdm server should not have thrown CdmSourceException");
-               }
-       }
-
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteApplicationConfigurationTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteApplicationConfigurationTest.java
deleted file mode 100644 (file)
index d0fb727..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.hibernate.collection.internal.AbstractPersistentCollection;
-import org.hibernate.proxy.AbstractLazyInitializer;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-import org.unitils.UnitilsJUnit4;
-
-import eu.etaxonomy.cdm.api.application.CdmApplicationController;
-import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.config.CdmSourceException;
-import eu.etaxonomy.cdm.database.CdmPersistentDataSource;
-import eu.etaxonomy.cdm.database.DataSourceNotFoundException;
-import eu.etaxonomy.cdm.database.ICdmDataSource;
-import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
-import eu.etaxonomy.cdm.remote.CdmRemoteSource;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
-
-/**
- * Base class for remoting tests, responsible mainly for setting up the 
- * remote configuration.
- * 
- * @author c.mathew
- * @created 13.032014
- */
-@Ignore
-public class RemoteApplicationConfigurationTest extends UnitilsJUnit4 {
-       private static final Logger logger = Logger.getLogger(RemoteLazyLoadingTest.class);
-       
-       protected static ICdmApplicationConfiguration applicationController;
-       /**
-        * @throws DataSourceNotFoundException 
-        */
-       @BeforeClass
-       public static void initializeContext() throws DataSourceNotFoundException {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               ICdmRemoteSource crs = CdmRemoteSource.NewInstance("local-cdm", "127.0.0.1", 8080, "", NomenclaturalCode.ICNAFP);
-               applicationController = 
-                               CdmApplicationRemoteController.NewInstance(crs, 
-                                               false, 
-                                               null,                                           
-                                               null);
-       }       
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteLazyLoadingTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemoteLazyLoadingTest.java
deleted file mode 100644 (file)
index ee0c8f3..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.remoting;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.Ignore;
-
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.api.service.ITaxonService;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.name.NonViralName;
-import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.SynonymRelationship;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-
-
-
-/**
- * Test class which tests remoting for persistent cdm entities. 
- * 
- * FIXME:Remoting saving tests are ignored until the merge development is underway
- * @author c.mathew
- *
- */
-
-public class RemoteLazyLoadingTest extends RemoteApplicationConfigurationTest {
-       
-       private static final Logger logger = Logger.getLogger(RemoteLazyLoadingTest.class);
-       
-       private static IClassificationService classificationService;
-       private static ITaxonService taxonService;
-       
-       private static List<TaxonNode> taxonNodes;
-       
-       private UUID taxonUuid1 = UUID.fromString("8217ef77-2ab1-4318-bd67-ccd0cdef07c4");
-       private UUID taxonUuid2 = UUID.fromString("ef96fafa-7750-4141-b31b-1ad1daab3e76");
-       
-       
-       @BeforeClass
-       public static void initializeServices() {
-               
-               
-               taxonService = applicationController.getTaxonService();
-               
-               classificationService= applicationController.getClassificationService();
-               List<Classification> classifications = classificationService.listClassifications(1,0,null,null);                
-               Assert.assertFalse(classifications.isEmpty());
-                       
-               Classification classification = classifications.get(0);
-               Assert.assertNotNull(classification);   
-               taxonNodes = classificationService.getAllNodes();
-               Assert.assertFalse(taxonNodes.isEmpty());       
-                       
-       }
-       
-       
-       
-       @Test
-       public void testCDMEntityGet() {
-               Iterator<TaxonNode> taxonNodeItr = taxonNodes.iterator();
-               int maxcount = 30;
-               int count = 0;
-               while(taxonNodeItr.hasNext() && count <= maxcount) {
-                       TaxonNode taxonNode = taxonNodeItr.next();
-                       Assert.assertNotNull(taxonNode);
-                       
-                       Taxon taxon = taxonNode.getTaxon();
-                       Assert.assertNotNull(taxon);
-                       
-                       String taxonTitle = taxon.getTitleCache();                      
-                       logger.info("Taxon : " + taxonTitle);
-                       
-                       TaxonNameBase name = taxon.getName();
-                       Assert.assertNotNull(name);
-                       
-                       String nameTitle = name.getTitleCache();
-                       logger.info("Taxon Name : " + nameTitle);               
-                       
-                       count++;
-               }
-
-               
-       }
-
-       
-       @Ignore
-       @Test
-       public void testCDMEntitySaveEager() {
-               Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
-               String oldTitleCache = taxon.getTitleCache();
-               
-               System.out.println("Taxon title : " + oldTitleCache);
-
-               taxon.setTitleCache(oldTitleCache + ":updated");
-               taxonService.merge(taxon);
-               
-               Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
-               System.out.println("New Taxon Title : " + taxonNew.getTitleCache());
-               
-               Assert.assertNotEquals("Title caches should not be equal",oldTitleCache,taxonNew.getTitleCache());
-               
-               taxonNew.setTitleCache(oldTitleCache);
-               taxonService.merge(taxonNew);
-               
-               Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
-               System.out.println("Old Taxon Title : " + taxonOld.getTitleCache());
-               
-               Assert.assertEquals("Title caches should be equal",oldTitleCache,taxonOld.getTitleCache());
-                       
-       }
-       
-       @Ignore
-       @Test
-       public void testCDMEntitySaveLazy() {
-               Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
-                               
-               NonViralName nvn = CdmBase.deproxy(taxon.getName(),NonViralName.class); 
-               String oldTitleCache = nvn.getTitleCache();
-               System.out.println("Taxon Name Title : " + oldTitleCache);
-               nvn.setTitleCache(oldTitleCache + ":updated");
-               taxonService.merge(taxon);
-               
-               Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);
-               NonViralName nvnNew = CdmBase.deproxy(taxon.getName(),NonViralName.class);                      
-               System.out.println("New Taxon Name Title : " + nvnNew.getTitleCache());
-               
-               Assert.assertNotEquals("Title caches should not be equal",oldTitleCache,nvnNew.getTitleCache());
-               
-               nvnNew.setTitleCache(oldTitleCache);
-               taxonService.merge(taxon);
-               
-               Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
-               NonViralName nvnOld = CdmBase.deproxy(taxon.getName(),NonViralName.class);                      
-               System.out.println("Old Taxon Name Title : " + nvnNew.getTitleCache());
-               
-               Assert.assertEquals("Title caches should be equal",oldTitleCache,nvnOld.getTitleCache());               
-       }
-       
-       @Ignore
-       @Test
-       public void testCDMEntitySaveCollection() {
-               Taxon taxon = (Taxon)taxonService.find(taxonUuid1);
-               
-               Set<SynonymRelationship> synRelations = taxon.getSynonymRelations();
-               Set<String> relToTitles = new HashSet<String>();
-               Iterator<SynonymRelationship> srItr = synRelations.iterator();
-               while(srItr.hasNext()) {
-                       SynonymRelationship sr = srItr.next();
-                       System.out.println("Synonym Title Cache : " + sr.getSynonym().getTitleCache());
-                       relToTitles.add(sr.getSynonym().getTitleCache());
-                       sr.getSynonym().setTitleCache(sr.getSynonym().getTitleCache() + ":updated");
-                       
-               }
-               taxonService.merge(taxon);
-               
-               Taxon taxonNew = (Taxon)taxonService.find(taxonUuid1);          
-               Set<SynonymRelationship> synRelationsNew = taxonNew.getSynonymRelations();
-               
-               Iterator<SynonymRelationship> srItrNew = synRelationsNew.iterator();
-               Iterator<String> relToTitlesItr = relToTitles.iterator();
-               while(srItrNew.hasNext() && relToTitlesItr.hasNext()) {
-                       SynonymRelationship srNew = srItrNew.next();
-                       String relToTitle = relToTitlesItr.next();
-                       System.out.println("New Synonym Title Cache: " + srNew.getSynonym().getTitleCache());
-                       Assert.assertNotEquals("Synonym Title caches should not be equal", srNew.getSynonym().getTitleCache(), relToTitle);
-                       srNew.getSynonym().setTitleCache(relToTitle);
-               }
-               
-               Taxon taxonOld = (Taxon)taxonService.find(taxonUuid1);
-               
-               Set<SynonymRelationship> synRelationsOld = taxonNew.getSynonymRelations();
-               Iterator<SynonymRelationship> srItrOld = synRelationsOld.iterator();
-               relToTitlesItr = relToTitles.iterator();
-               while(srItrOld.hasNext() && relToTitlesItr.hasNext()) {
-                       SynonymRelationship srOld = srItrOld.next();
-                       String relToTitle = relToTitlesItr.next();
-                       System.out.println("New Synonym Title Cache: " + srOld.getSynonym().getTitleCache());
-                       Assert.assertEquals("Synonym Title caches should be equal", srOld.getSynonym().getTitleCache(), relToTitle);
-                       
-               }
-       }
-}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemotePersistentCollectionTest.java b/eu.etaxonomy.taxeditor.cdmlib/src/test/java/eu/etaxonomy/taxeditor/remoting/RemotePersistentCollectionTest.java
deleted file mode 100644 (file)
index 2bf7567..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.remoting;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.hibernate.collection.internal.AbstractPersistentCollection;
-import org.hibernate.collection.spi.PersistentCollection;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.unitils.UnitilsJUnit4;
-
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.Language;
-import eu.etaxonomy.cdm.model.common.LanguageString;
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.description.TaxonDescription;
-import eu.etaxonomy.cdm.model.description.TextData;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.strategy.match.MatchException;
-
-/**
- * Test class which tests remoting for persistent collections.
- * 
- * @author c.mathew
- * @created 13.03.2014
- */
-public class RemotePersistentCollectionTest extends RemoteApplicationConfigurationTest {
-       private static final Logger logger = Logger.getLogger(RemotePersistentCollectionTest.class);
-               
-       private static IClassificationService classificationService;
-
-       @BeforeClass
-       public static void initializeServices() {
-               Logger.getRootLogger().setLevel(Level.INFO);
-               classificationService= applicationController.getClassificationService();
-       }
-       
-       /**
-        * Test method which checks remoting for persistent lists.
-        * 
-        */
-       @Test
-       public void persistentListTest() {
-               
-               List<TaxonNode> taxonNodes = classificationService.getAllNodes();                               
-               int size = taxonNodes.size();
-               logger.debug("classificationService.getAllNodes() size : " + size);
-               TaxonNode taxonNode = null;
-               if(size > 0) {
-                       Assert.assertFalse(taxonNodes.isEmpty());               
-                       
-                       taxonNode = taxonNodes.get(0);
-                       Assert.assertNotNull(taxonNode);
-                       Assert.assertTrue(taxonNodes.contains(taxonNode));
-                                               
-                       // get the list of child nodes, which will give a
-                       // proxy list which is not yet initialised
-                       List<TaxonNode> childNodes = taxonNode.getChildNodes();                 
-                       // this size call will first initialise the list locally by internally
-                       // calling the ICommonService.initializeCollection method and then
-                       // call size on the initialised list
-                       int childCount = childNodes.size();
-                       
-                       // this size call will initialise the list remotely and only return the
-                       // size of the list
-                       int remoteChildCount = applicationController.getCommonService().size((PersistentCollection)childNodes);
-                       Assert.assertEquals(childCount, remoteChildCount);
-                       
-                       String firstNodeTaxonTitle = taxonNode.getTaxon().getTitleCache();
-                       Assert.assertNotNull(firstNodeTaxonTitle);                                      
-                       
-                       if(childCount > 0) {
-                               Assert.assertFalse(childNodes.isEmpty());
-                               // this get call will use the already initialised list to get the
-                               // 0th element
-                               TaxonNode localTaxonNode = childNodes.get(0);
-                                                               
-                               // this get call will initialise the list remotely and only return the
-                               // 0th element from the list
-                               TaxonNode remoteTaxonNode = (TaxonNode)applicationController.getCommonService().get((PersistentCollection)childNodes,0);
-                               
-                               // the locally and remotely retrieved taxon node should exist in the
-                               // (local and remote) child nodes list, should be not-null and should be equal to each other                            
-                               Assert.assertTrue(taxonNode.getChildNodes().contains(localTaxonNode));
-                               Assert.assertTrue(taxonNode.getChildNodes().contains(remoteTaxonNode));
-                               Assert.assertTrue(applicationController.getCommonService().contains((PersistentCollection)childNodes, localTaxonNode));
-                               Assert.assertTrue(applicationController.getCommonService().contains((PersistentCollection)childNodes, remoteTaxonNode));
-                               Assert.assertNotNull(remoteTaxonNode);
-                               Assert.assertNotNull(localTaxonNode);
-                               Assert.assertEquals(remoteTaxonNode,localTaxonNode);                                                                                                            
-                       }                       
-               }                                                       
-       }
-       
-       @Test
-       public void persistentSetTest() {                       
-               List<Classification> classifications = classificationService.listClassifications(1,0,null,null);
-               int size = classifications.size();
-               if(size > 0) {
-                       Assert.assertFalse(classifications.isEmpty());
-                       
-                       Classification classification = classifications.get(0);
-                       Assert.assertNotNull(classification);
-                       Assert.assertTrue(classifications.contains(classification));
-                       
-                       TaxonNode rootTaxonNode = classification.getRootNode();
-                       // get the list of child nodes, which will give a
-                       // proxy list which is not yet initialised
-                       List<TaxonNode> childNodes = rootTaxonNode.getChildNodes();
-                       
-                       // this size call will initialise the list locally by internally
-                       // calling the ICommonService.initializeCollection method
-                       int childCount = childNodes.size();
-                       
-                       if(childCount > 0) {
-                               Assert.assertFalse(childNodes.isEmpty());
-                               
-                               // this get call will use the already initialised list to get the
-                               // 0th element
-                               Taxon localTaxon = childNodes.get(0).getTaxon();
-                               Assert.assertNotNull(localTaxon);
-                                                               
-                               TaxonNameBase taxonName = localTaxon.getName(); 
-                               Assert.assertNotNull(taxonName);
-                               
-                               // get the list of taxa, which will give a
-                               // proxy set which is not yet initialised
-                               Set<Taxon> taxa = taxonName.getTaxonBases();
-
-                               // this size call will initialise the list locally by internally
-                               // calling the ICommonService.initializeCollection method
-                               int taxaCount = taxa.size();
-                               Assert.assertNotEquals(taxaCount,-1);
-                                                               
-                               if(taxaCount > 0) {
-                                       Assert.assertFalse(taxa.isEmpty());             
-                                       // the locally retrieved taxon should exist in the
-                                       // (local and remote) taxon list and should be not-null 
-                                       Assert.assertTrue(taxa.contains(localTaxon));   
-                                       Assert.assertNotNull(localTaxon);       
-                                       Assert.assertTrue(applicationController.getCommonService().contains((PersistentCollection)taxa, localTaxon));                                                                           
-                               }
-                       }                       
-               }
-       }
-       
-       @Test
-       public void persistentMapTest() {       
-               List<TaxonNode> taxonNodes = classificationService.getAllNodes();       
-               // calling iterator will initialise the collection
-               Iterator<TaxonNode> taxonNodesItr = taxonNodes.iterator();
-               while(taxonNodesItr.hasNext()) {
-                       TaxonNode taxonNode = taxonNodesItr.next();
-                       Taxon taxon = taxonNode.getTaxon();
-
-                       if(taxon != null) {
-                               Set<TaxonDescription> descriptions = taxon.getDescriptions();
-                               Iterator<TaxonDescription> descriptionsItr = descriptions.iterator();
-                               while(descriptionsItr.hasNext()) {
-                                       TaxonDescription desc = descriptionsItr.next();
-                                       if(desc != null) {
-                                               for (DescriptionElementBase element : desc.getElements()){                                                      
-                                                       if (element.isInstanceOf(TextData.class)){
-                                                               // usually a call to 'get' collections should not initialise the collection,
-                                                               // but the 'getMultilanguageText' call internally calls readSize on the collection
-                                                               // which triggers the initialisation
-                                                               Map<Language, LanguageString> multilanguagetextMap = ((TextData)element).getMultilanguageText();
-                                                               boolean init = AbstractPersistentCollection.isInitialized(multilanguagetextMap); 
-                                                               Assert.assertTrue(init);
-                                                               
-                                                               if(!multilanguagetextMap.isEmpty()) {
-                                                                       // found a map whcih we can test!
-                                                                       logger.info("Found Non-empty multilanguagetextMap");
-                                                                       boolean empty = applicationController.getCommonService().isEmpty((PersistentCollection)multilanguagetextMap);
-                                                                       Assert.assertFalse(empty);
-                                                                       // test retrieval of key set, which should already by initialised
-                                                                       Set<Language> langKeySet = multilanguagetextMap.keySet();
-                                                                       Iterator<Language> langKeySetItr = langKeySet.iterator();
-                                                                       while(langKeySetItr.hasNext()) {
-                                                                               Language key = langKeySetItr.next();            
-                                                                               // testing 'containsKey' on locally initialised collection
-                                                                               boolean localContainsKey = multilanguagetextMap.containsKey(key);
-                                                                               Assert.assertTrue(localContainsKey);
-                                                                               // testing 'containsKey' on remotely initialised collection
-                                                                               boolean remoteContainsKey = 
-                                                                                               applicationController.getCommonService().containsKey((PersistentCollection)multilanguagetextMap, key);
-                                                                               Assert.assertTrue(remoteContainsKey);
-                                                                               
-                                                                               LanguageString value = multilanguagetextMap.get(key);
-                                                                               // testing 'containsValue' on locally initialised collection
-                                                                               boolean localContainsValue = multilanguagetextMap.containsValue(value);
-                                                                               Assert.assertTrue(localContainsValue);
-                                                                               // testing 'containsValue' on remotely initialised collection
-                                                                               boolean remoteContainsValue = 
-                                                                                               applicationController.getCommonService().containsValue((PersistentCollection)multilanguagetextMap, value);
-                                                                               Assert.assertTrue(remoteContainsValue);
-                                                                               
-                                                                       }
-                                                                       return;                                                                 
-                                                               }
-                                                       }                                                       
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-}