Method {{{isEvenDistance}}} did not work correctly.
[cdmlib.git] / cdmlib-services / src / test / java / eu / etaxonomy / cdm / api / facade / DerivedUnitFacadeTest.java
index 06422fb76d27240cc1b02fb88140b8dd0b460d72..3ca1beee2a73b7e36d2c784a24c438c5c1fe2c99 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$\r
 /**\r
-* Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
-* http://www.e-taxonomy.eu\r
-* \r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
+ * Copyright (C) 2009 EDIT\r
+ * European Distributed Institute of Taxonomy \r
+ * http://www.e-taxonomy.eu\r
+ \r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
 package eu.etaxonomy.cdm.api.facade;\r
 \r
 import java.lang.reflect.Field;\r
@@ -63,19 +63,18 @@ import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest;
 /**\r
  * @author a.mueller\r
  * @date 17.05.2010\r
- *\r
+ * \r
  */\r
 public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {\r
-       private static final Logger logger = Logger.getLogger(DerivedUnitFacadeTest.class);\r
-       \r
+       private static final Logger logger = Logger\r
+                       .getLogger(DerivedUnitFacadeTest.class);\r
+\r
        @SpringBeanByType\r
        private IOccurrenceService service;\r
 \r
        @SpringBeanByType\r
        private ITermService termService;\r
 \r
-       \r
-       \r
        Specimen specimen;\r
        DerivationEvent derivationEvent;\r
        FieldObservation fieldObservation;\r
@@ -90,43 +89,46 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
        Point exactLocation = Point.NewInstance(12.3, 10.567, referenceSystem, 22);\r
        String gatheringEventDescription = "A nice gathering description";\r
        TimePeriod gatheringPeriod = TimePeriod.NewInstance(1888, 1889);\r
-       \r
+\r
        String fieldNumber = "15p23B";\r
        String fieldNotes = "such a beautiful specimen";\r
 \r
        Integer individualCount = 1;\r
        Stage lifeStage = Stage.NewInstance("A wonderful stage", "stage", "st");\r
        Sex sex = Sex.NewInstance("FemaleMale", "FM", "FM");\r
-       LanguageString locality = LanguageString.NewInstance("My locality", Language.DEFAULT());\r
+       LanguageString locality = LanguageString.NewInstance("My locality",\r
+                       Language.DEFAULT());\r
 \r
        String accessionNumber = "888462535";\r
        String catalogNumber = "UU879873590";\r
-       TaxonNameBase taxonName = BotanicalName.NewInstance(Rank.GENUS(), "Abies", null, null, null, null, null, null, null);\r
+       TaxonNameBase taxonName = BotanicalName.NewInstance(Rank.GENUS(), "Abies",\r
+                       null, null, null, null, null, null, null);\r
        String collectorsNumber = "234589913A34";\r
        Collection collection = Collection.NewInstance();\r
-       PreservationMethod preservationMethod = PreservationMethod.NewInstance("my prservation", null, null);\r
+       PreservationMethod preservationMethod = PreservationMethod.NewInstance(\r
+                       "my prservation", null, null);\r
 \r
        DerivedUnitFacade specimenFacade;\r
-       \r
+\r
        Specimen collectionSpecimen;\r
        GatheringEvent existingGatheringEvent;\r
        DerivationEvent firstDerivationEvent;\r
        FieldObservation firstFieldObject;\r
        Media media1 = Media.NewInstance();\r
-       \r
+\r
        DerivedUnitFacade emptyFacade;\r
-       \r
+\r
        NamedArea country = WaterbodyOrCountry.GERMANY();\r
-       \r
-       \r
-//****************************** SET UP *****************************************/\r
-       \r
+\r
+       // ****************************** SET UP\r
+       // *****************************************/\r
+\r
        /**\r
         * @throws java.lang.Exception\r
         */\r
        @BeforeClass\r
        public static void setUpBeforeClass() throws Exception {\r
-               //new DefaultTermInitializer().initialize();\r
+               // new DefaultTermInitializer().initialize();\r
        }\r
 \r
        /**\r
@@ -135,7 +137,7 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
        @Before\r
        public void setUp() throws Exception {\r
                specimen = Specimen.NewInstance();\r
-               \r
+\r
                derivationEvent = DerivationEvent.NewInstance();\r
                specimen.setDerivedFrom(derivationEvent);\r
                fieldObservation = FieldObservation.NewInstance();\r
@@ -151,10 +153,10 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
                gatheringEvent.setExactLocation(exactLocation);\r
                gatheringEvent.setDescription(gatheringEventDescription);\r
                gatheringEvent.setCountry(country);\r
-               \r
+\r
                gatheringEvent.setTimeperiod(gatheringPeriod);\r
                gatheringEvent.setLocality(locality);\r
-               \r
+\r
                fieldObservation.setFieldNumber(fieldNumber);\r
                fieldObservation.setFieldNotes(fieldNotes);\r
                fieldObservation.setIndividualCount(individualCount);\r
@@ -170,111 +172,136 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
 \r
                specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
 \r
-               //existing specimen with 2 derivation events in line\r
+               // existing specimen with 2 derivation events in line\r
                collectionSpecimen = Specimen.NewInstance();\r
                Specimen middleSpecimen = Specimen.NewInstance();\r
                firstFieldObject = FieldObservation.NewInstance();\r
-               \r
+\r
                DerivationEvent lastDerivationEvent = DerivationEvent.NewInstance();\r
                DerivationEvent middleDerivationEvent = DerivationEvent.NewInstance();\r
                firstDerivationEvent = DerivationEvent.NewInstance();\r
-               \r
+\r
                collectionSpecimen.setDerivedFrom(lastDerivationEvent);\r
-               \r
+\r
                lastDerivationEvent.addOriginal(middleSpecimen);\r
                middleSpecimen.setDerivedFrom(firstDerivationEvent);\r
                firstDerivationEvent.addOriginal(firstFieldObject);\r
                existingGatheringEvent = GatheringEvent.NewInstance();\r
                firstFieldObject.setGatheringEvent(existingGatheringEvent);\r
-               \r
-               //empty facade\r
+\r
+               // empty facade\r
                emptyFacade = DerivedUnitFacade.NewInstance(DerivedUnitType.Specimen);\r
 \r
        }\r
 \r
+       // ****************************** TESTS\r
+       // *****************************************/\r
 \r
-//****************************** TESTS *****************************************/\r
-       \r
        @Test\r
        @DataSet("DerivedUnitFacadeTest.testSetFieldObjectImageGallery.xml")\r
        @ExpectedDataSet\r
-       public void testSetFieldObjectImageGallery()  {\r
+       public void testSetFieldObjectImageGallery() {\r
                UUID imageFeatureUuid = Feature.IMAGE().getUuid();\r
-               Feature imageFeature = (Feature)termService.find(imageFeatureUuid);\r
-               \r
-               DerivedUnitFacade facade = DerivedUnitFacade.NewInstance(DerivedUnitType.Specimen);\r
+               Feature imageFeature = (Feature) termService.find(imageFeatureUuid);\r
+\r
+               DerivedUnitFacade facade = DerivedUnitFacade\r
+                               .NewInstance(DerivedUnitType.Specimen);\r
                facade.setFieldNumber("12345");\r
-               Media media = Media.NewInstance(URI.create("www.abc.de"), 200, null, "jpeg");\r
-               \r
+               Media media = Media.NewInstance(URI.create("www.abc.de"), 200, null,\r
+                               "jpeg");\r
+\r
                try {\r
-                       SpecimenDescription imageGallery = SpecimenDescription.NewInstance();\r
-                       imageGallery.addDescribedSpecimenOrObservation(facade.innerFieldObservation());\r
+                       SpecimenDescription imageGallery = SpecimenDescription\r
+                                       .NewInstance();\r
+                       imageGallery.addDescribedSpecimenOrObservation(facade\r
+                                       .innerFieldObservation());\r
                        imageGallery.setImageGallery(true);\r
                        TextData textData = TextData.NewInstance();\r
                        textData.setFeature(imageFeature);\r
                        imageGallery.addElement(textData);\r
                        textData.addMedia(media);\r
                        facade.setFieldObjectImageGallery(imageGallery);\r
-                       \r
+\r
                } catch (DerivedUnitFacadeNotSupportedException e1) {\r
                        e1.printStackTrace();\r
                        Assert.fail(e1.getLocalizedMessage());\r
                }\r
                this.service.save(facade.innerDerivedUnit());\r
-                               \r
-//             setComplete(); endTransaction();\r
-//             try {if (true){printDataSet(System.out, new String[]{"HIBERNATE_SEQUENCES","SPECIMENOROBSERVATIONBASE","SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT" ,"DERIVATIONEVENT", "DESCRIPTIONBASE","DESCRIPTIONELEMENTBASE","DESCRIPTIONELEMENTBASE_MEDIA","DESCRIPTIONBASE_SPECIMENOROBSERVATIONBASE", "MEDIA", "MEDIAREPRESENTATION","MEDIAREPRESENTATIONPART"});}\r
-//             } catch(Exception e) { logger.warn(e);} \r
-\r
-               \r
-       }       \r
-       \r
+\r
+               // setComplete(); endTransaction();\r
+               // try {if (true){printDataSet(System.out, new\r
+               // String[]{"HIBERNATE_SEQUENCES","SPECIMENOROBSERVATIONBASE","SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT"\r
+               // ,"DERIVATIONEVENT",\r
+               // "DESCRIPTIONBASE","DESCRIPTIONELEMENTBASE","DESCRIPTIONELEMENTBASE_MEDIA","DESCRIPTIONBASE_SPECIMENOROBSERVATIONBASE",\r
+               // "MEDIA", "MEDIAREPRESENTATION","MEDIAREPRESENTATIONPART"});}\r
+               // } catch(Exception e) { logger.warn(e);}\r
+\r
+       }\r
+\r
        @Test\r
-       @Ignore //TODO generally works but has id problems when running together with above test ()setFieldObjectImageGallery. Therefore set to ignore.\r
+       @Ignore\r
+       // TODO generally works but has id problems when running together with above\r
+       // test ()setFieldObjectImageGallery. Therefore set to ignore.\r
        @DataSet("DerivedUnitFacadeTest.testSetDerivedUnitImageGallery.xml")\r
        @ExpectedDataSet\r
-       public void testSetDerivedUnitImageGallery()  {\r
-//             UUID specimenUUID = UUID.fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
-//             Specimen specimen = (Specimen)service.find(specimenUUID);\r
-               DerivedUnitFacade facade = DerivedUnitFacade.NewInstance(DerivedUnitType.Specimen);\r
-               Media media = Media.NewInstance(URI.create("www.derivedUnitImage.de"), 200, null, "png");\r
-               \r
+       public void testSetDerivedUnitImageGallery() {\r
+               // UUID specimenUUID =\r
+               // UUID.fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
+               // Specimen specimen = (Specimen)service.find(specimenUUID);\r
+               DerivedUnitFacade facade = DerivedUnitFacade\r
+                               .NewInstance(DerivedUnitType.Specimen);\r
+               Media media = Media.NewInstance(URI.create("www.derivedUnitImage.de"),\r
+                               200, null, "png");\r
+\r
                try {\r
-                       SpecimenDescription imageGallery = SpecimenDescription.NewInstance();\r
-                       imageGallery.addDescribedSpecimenOrObservation(facade.innerDerivedUnit());\r
+                       SpecimenDescription imageGallery = SpecimenDescription\r
+                                       .NewInstance();\r
+                       imageGallery.addDescribedSpecimenOrObservation(facade\r
+                                       .innerDerivedUnit());\r
                        imageGallery.setImageGallery(true);\r
                        TextData textData = TextData.NewInstance();\r
                        imageGallery.addElement(textData);\r
                        textData.addMedia(media);\r
                        facade.setDerivedUnitImageGallery(imageGallery);\r
-                       \r
+\r
                } catch (DerivedUnitFacadeNotSupportedException e1) {\r
                        e1.printStackTrace();\r
                        Assert.fail(e1.getLocalizedMessage());\r
                }\r
                this.service.save(facade.innerDerivedUnit());\r
-                               \r
-//             setComplete(); endTransaction();\r
-//             try {if (true){printDataSet(System.out, new String[]{"HIBERNATE_SEQUENCES","SPECIMENOROBSERVATIONBASE","SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT" ,"DERIVATIONEVENT", "DESCRIPTIONBASE","DESCRIPTIONELEMENTBASE","DESCRIPTIONELEMENTBASE_MEDIA","DESCRIPTIONBASE_SPECIMENOROBSERVATIONBASE", "MEDIA", "MEDIAREPRESENTATION","MEDIAREPRESENTATIONPART"});}\r
-//             } catch(Exception e) { logger.warn(e);} \r
-\r
-               \r
-       }       \r
-       \r
+\r
+               // setComplete(); endTransaction();\r
+               // try {if (true){printDataSet(System.out, new\r
+               // String[]{"HIBERNATE_SEQUENCES","SPECIMENOROBSERVATIONBASE","SPECIMENOROBSERVATIONBASE_DERIVATIONEVENT"\r
+               // ,"DERIVATIONEVENT",\r
+               // "DESCRIPTIONBASE","DESCRIPTIONELEMENTBASE","DESCRIPTIONELEMENTBASE_MEDIA","DESCRIPTIONBASE_SPECIMENOROBSERVATIONBASE",\r
+               // "MEDIA", "MEDIAREPRESENTATION","MEDIAREPRESENTATIONPART"});}\r
+               // } catch(Exception e) { logger.warn(e);}\r
+\r
+       }\r
+\r
        @Test\r
        @DataSet\r
-       public void testGetFieldObjectImageGalleryBooleanPersisted(){\r
-               UUID specimenUUID = UUID.fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
-               Specimen specimen = (Specimen)service.find(specimenUUID);\r
+       public void testGetFieldObjectImageGalleryBooleanPersisted() {\r
+               UUID specimenUUID = UUID\r
+                               .fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
+               Specimen specimen = (Specimen) service.find(specimenUUID);\r
                Assert.assertNotNull("Specimen should exist (persisted)", specimen);\r
                try {\r
                        DerivedUnitFacade facade = DerivedUnitFacade.NewInstance(specimen);\r
-                       SpecimenDescription imageGallery = facade.getFieldObjectImageGallery(true);\r
+                       SpecimenDescription imageGallery = facade\r
+                                       .getFieldObjectImageGallery(true);\r
                        Assert.assertNotNull("Image gallery should exist", imageGallery);\r
-                       Assert.assertEquals("UUID should be equal to the persisted uuid", UUID.fromString("8cb772e9-1577-45c6-91ab-dbec1413c060"), imageGallery.getUuid());\r
-                       Assert.assertEquals("The image gallery should be flagged as such", true, imageGallery.isImageGallery());\r
-                       Assert.assertEquals("There should be one TextData in image gallery", 1, imageGallery.getElements().size());\r
-                       List<Media> media = imageGallery.getElements().iterator().next().getMedia();\r
+                       Assert.assertEquals("UUID should be equal to the persisted uuid",\r
+                                       UUID.fromString("8cb772e9-1577-45c6-91ab-dbec1413c060"),\r
+                                       imageGallery.getUuid());\r
+                       Assert.assertEquals("The image gallery should be flagged as such",\r
+                                       true, imageGallery.isImageGallery());\r
+                       Assert.assertEquals(\r
+                                       "There should be one TextData in image gallery", 1,\r
+                                       imageGallery.getElements().size());\r
+                       List<Media> media = imageGallery.getElements().iterator().next()\r
+                                       .getMedia();\r
                        Assert.assertEquals("There should be 1 media", 1, media.size());\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        e.printStackTrace();\r
@@ -282,21 +309,28 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
                }\r
        }\r
 \r
-       \r
        @Test\r
        @DataSet\r
-       public void testGetDerivedUnitImageGalleryBooleanPersisted(){\r
-               UUID specimenUUID = UUID.fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
-               Specimen specimen = (Specimen)service.find(specimenUUID);\r
+       public void testGetDerivedUnitImageGalleryBooleanPersisted() {\r
+               UUID specimenUUID = UUID\r
+                               .fromString("25383fc8-789b-4eff-92d3-a770d0622351");\r
+               Specimen specimen = (Specimen) service.find(specimenUUID);\r
                Assert.assertNotNull("Specimen should exist (persisted)", specimen);\r
                try {\r
                        DerivedUnitFacade facade = DerivedUnitFacade.NewInstance(specimen);\r
-                       SpecimenDescription imageGallery = facade.getDerivedUnitImageGallery(true);\r
+                       SpecimenDescription imageGallery = facade\r
+                                       .getDerivedUnitImageGallery(true);\r
                        Assert.assertNotNull("Image gallery should exist", imageGallery);\r
-                       Assert.assertEquals("UUID should be equal to the persisted uuid", UUID.fromString("cb03acc4-8363-4020-aeef-ea8a8bcc0fe9"), imageGallery.getUuid());\r
-                       Assert.assertEquals("The image gallery should be flagged as such", true, imageGallery.isImageGallery());\r
-                       Assert.assertEquals("There should be one TextData in image gallery", 1, imageGallery.getElements().size());\r
-                       List<Media> media = imageGallery.getElements().iterator().next().getMedia();\r
+                       Assert.assertEquals("UUID should be equal to the persisted uuid",\r
+                                       UUID.fromString("cb03acc4-8363-4020-aeef-ea8a8bcc0fe9"),\r
+                                       imageGallery.getUuid());\r
+                       Assert.assertEquals("The image gallery should be flagged as such",\r
+                                       true, imageGallery.isImageGallery());\r
+                       Assert.assertEquals(\r
+                                       "There should be one TextData in image gallery", 1,\r
+                                       imageGallery.getElements().size());\r
+                       List<Media> media = imageGallery.getElements().iterator().next()\r
+                                       .getMedia();\r
                        Assert.assertEquals("There should be 1 media", 1, media.size());\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        e.printStackTrace();\r
@@ -304,171 +338,213 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
                }\r
        }\r
 \r
-       \r
        @Test\r
-       public void testGetDerivedUnitImageGalleryBoolean(){\r
+       public void testGetDerivedUnitImageGalleryBoolean() {\r
                Specimen specimen = Specimen.NewInstance();\r
                try {\r
                        DerivedUnitFacade facade = DerivedUnitFacade.NewInstance(specimen);\r
-                       SpecimenDescription imageGallery = facade.getDerivedUnitImageGallery(true);\r
-                       Assert.assertNotNull("Image Gallery should have been created", imageGallery);\r
-                       Assert.assertEquals("The image gallery should be flagged as such", true, imageGallery.isImageGallery());\r
+                       SpecimenDescription imageGallery = facade\r
+                                       .getDerivedUnitImageGallery(true);\r
+                       Assert.assertNotNull("Image Gallery should have been created",\r
+                                       imageGallery);\r
+                       Assert.assertEquals("The image gallery should be flagged as such",\r
+                                       true, imageGallery.isImageGallery());\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        e.printStackTrace();\r
                        Assert.fail();\r
                }\r
-               \r
-               \r
+\r
        }\r
 \r
-       \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#NewInstance()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#NewInstance()}.\r
         */\r
        @Test\r
        public void testNewInstance() {\r
-               Assert.assertNotNull("The specimen should have been created", specimenFacade.innerDerivedUnit());\r
-               //???\r
-//             Assert.assertNotNull("The derivation event should have been created", specimenFacade.getSpecimen().getDerivedFrom());\r
-//             Assert.assertNotNull("The field observation should have been created", specimenFacade.getFieldObservation());\r
-//             Assert.assertNotNull("The gathering event should have been created", specimenFacade.getGatheringEvent());\r
+               Assert.assertNotNull("The specimen should have been created",\r
+                               specimenFacade.innerDerivedUnit());\r
+               // ???\r
+               // Assert.assertNotNull("The derivation event should have been created",\r
+               // specimenFacade.getSpecimen().getDerivedFrom());\r
+               // Assert.assertNotNull("The field observation should have been created",\r
+               // specimenFacade.getFieldObservation());\r
+               // Assert.assertNotNull("The gathering event should have been created",\r
+               // specimenFacade.getGatheringEvent());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#NewInstance(eu.etaxonomy.cdm.model.occurrence.Specimen)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#NewInstance(eu.etaxonomy.cdm.model.occurrence.Specimen)}\r
+        * .\r
         */\r
        @Test\r
        public void testNewInstanceSpecimen() {\r
-               Assert.assertSame("Specimen should be same", specimen, specimenFacade.innerDerivedUnit());\r
-               Assert.assertSame("Derivation event should be same", derivationEvent, specimenFacade.innerDerivedUnit().getDerivedFrom());\r
-               Assert.assertSame("Field observation should be same", fieldObservation, specimenFacade.innerFieldObservation());\r
-               Assert.assertSame("Gathering event should be same", gatheringEvent, specimenFacade.innerGatheringEvent());\r
-       \r
+               Assert.assertSame("Specimen should be same", specimen,\r
+                               specimenFacade.innerDerivedUnit());\r
+               Assert.assertSame("Derivation event should be same", derivationEvent,\r
+                               specimenFacade.innerDerivedUnit().getDerivedFrom());\r
+               Assert.assertSame("Field observation should be same", fieldObservation,\r
+                               specimenFacade.innerFieldObservation());\r
+               Assert.assertSame("Gathering event should be same", gatheringEvent,\r
+                               specimenFacade.innerGatheringEvent());\r
+\r
        }\r
 \r
        @Test\r
-       public void testGatheringEventIsConnectedToDerivedUnit(){\r
+       public void testGatheringEventIsConnectedToDerivedUnit() {\r
                Specimen specimen = Specimen.NewInstance();\r
                DerivedUnitFacade specimenFacade;\r
                try {\r
                        specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
                        specimenFacade.setDistanceToGround(2);\r
-                       FieldObservation specimenFieldObservation = (FieldObservation)specimen.getDerivedFrom().getOriginals().iterator().next();\r
-                       Assert.assertSame("Facade gathering event and specimen gathering event should be the same",specimenFacade.innerGatheringEvent(), specimenFieldObservation.getGatheringEvent());\r
+                       FieldObservation specimenFieldObservation = (FieldObservation) specimen\r
+                                       .getDerivedFrom().getOriginals().iterator().next();\r
+                       Assert.assertSame(\r
+                                       "Facade gathering event and specimen gathering event should be the same",\r
+                                       specimenFacade.innerGatheringEvent(),\r
+                                       specimenFieldObservation.getGatheringEvent());\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        Assert.fail("An error should not occur in NewInstance()");\r
                }\r
        }\r
-       \r
+\r
        @Test\r
-       public void testNoGatheringEventAndFieldObservation(){\r
+       public void testNoGatheringEventAndFieldObservation() {\r
                Specimen specimen = Specimen.NewInstance();\r
                DerivedUnitFacade specimenFacade;\r
                try {\r
                        specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
-                       Assert.assertNull("No field observation should exists", specimenFacade.innerFieldObservation());\r
+                       Assert.assertNull("No field observation should exists",\r
+                                       specimenFacade.innerFieldObservation());\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        Assert.fail("An error should not occur in NewInstance()");\r
                }\r
        }\r
-       \r
+\r
        @Test\r
-       public void testInititializeTextDataWithSupportTest(){\r
-               //TODO\r
+       public void testInititializeTextDataWithSupportTest() {\r
+               // TODO\r
                Specimen specimen = Specimen.NewInstance();\r
                DerivedUnitFacade specimenFacade;\r
                try {\r
                        specimenFacade = DerivedUnitFacade.NewInstance(specimen);\r
                        specimenFacade.setEcology("Ecology");\r
                        String plantDescription = specimenFacade.getPlantDescription();\r
-                       Assert.assertNull("No plantDescription should exist yet and no NPE should be thrown until now", plantDescription);\r
+                       Assert.assertNull(\r
+                                       "No plantDescription should exist yet and no NPE should be thrown until now",\r
+                                       plantDescription);\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        Assert.fail("An error should not occur in NewInstance()");\r
                }\r
        }\r
-       \r
-       \r
+\r
        @Test\r
-       public void testGetSetCountry(){\r
+       public void testGetSetCountry() {\r
                logger.warn("Not yet implemented");\r
        }\r
-       \r
-       \r
+\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addCollectingArea(eu.etaxonomy.cdm.model.location.NamedArea)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addCollectingArea(eu.etaxonomy.cdm.model.location.NamedArea)}\r
+        * .\r
         */\r
        @Test\r
-       public void testAddGetRemoveCollectingArea()  {\r
+       public void testAddGetRemoveCollectingArea() {\r
                String tdwgLabel = "GER";\r
                NamedArea tdwgArea = TdwgArea.getAreaByTdwgAbbreviation(tdwgLabel);\r
-               NamedArea newCollectingArea = NamedArea.NewInstance("A nice area", "nice", "n");\r
+               NamedArea newCollectingArea = NamedArea.NewInstance("A nice area",\r
+                               "nice", "n");\r
                specimenFacade.addCollectingArea(newCollectingArea);\r
-               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade.getCollectingAreas().size());\r
-               Assert.assertSame("Areas should be same", newCollectingArea, specimenFacade.innerFieldObservation().getGatheringEvent().getCollectingAreas().iterator().next());\r
+               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade\r
+                               .getCollectingAreas().size());\r
+               Assert.assertSame("Areas should be same", newCollectingArea,\r
+                               specimenFacade.innerFieldObservation().getGatheringEvent()\r
+                                               .getCollectingAreas().iterator().next());\r
                specimenFacade.addCollectingArea(tdwgArea);\r
-               Assert.assertEquals("Exactly 2 areas must exist", 2, specimenFacade.getCollectingAreas().size());\r
+               Assert.assertEquals("Exactly 2 areas must exist", 2, specimenFacade\r
+                               .getCollectingAreas().size());\r
                specimenFacade.removeCollectingArea(newCollectingArea);\r
-               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade.getCollectingAreas().size());\r
-               NamedArea remainingArea = specimenFacade.getCollectingAreas().iterator().next();\r
+               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade\r
+                               .getCollectingAreas().size());\r
+               NamedArea remainingArea = specimenFacade.getCollectingAreas()\r
+                               .iterator().next();\r
                Assert.assertEquals("Areas should be same", tdwgArea, remainingArea);\r
                specimenFacade.removeCollectingArea(tdwgArea);\r
-               Assert.assertEquals("No area should remain", 0, specimenFacade.getCollectingAreas().size());\r
+               Assert.assertEquals("No area should remain", 0, specimenFacade\r
+                               .getCollectingAreas().size());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addCollectingArea(eu.etaxonomy.cdm.model.location.NamedArea)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addCollectingArea(eu.etaxonomy.cdm.model.location.NamedArea)}\r
+        * .\r
         */\r
        @Test\r
-       public void testAddCollectingAreas()  {\r
+       public void testAddCollectingAreas() {\r
                NamedArea firstArea = NamedArea.NewInstance("A nice area", "nice", "n");\r
-               Assert.assertEquals("No area must exist", 0, specimenFacade.getCollectingAreas().size());\r
+               Assert.assertEquals("No area must exist", 0, specimenFacade\r
+                               .getCollectingAreas().size());\r
                specimenFacade.addCollectingArea(firstArea);\r
-               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade.getCollectingAreas().size());\r
-               \r
+               Assert.assertEquals("Exactly 1 area must exist", 1, specimenFacade\r
+                               .getCollectingAreas().size());\r
+\r
                String tdwgLabel = "GER";\r
                NamedArea tdwgArea = TdwgArea.getAreaByTdwgAbbreviation(tdwgLabel);\r
-               NamedArea secondArea = NamedArea.NewInstance("A nice area", "nice", "n");\r
-               \r
+               NamedArea secondArea = NamedArea\r
+                               .NewInstance("A nice area", "nice", "n");\r
+\r
                java.util.Collection<NamedArea> areaCollection = new HashSet<NamedArea>();\r
                areaCollection.add(secondArea);\r
                areaCollection.add(tdwgArea);\r
                specimenFacade.addCollectingAreas(areaCollection);\r
-               Assert.assertEquals("Exactly 3 areas must exist", 3, specimenFacade.getCollectingAreas().size());\r
-               \r
+               Assert.assertEquals("Exactly 3 areas must exist", 3, specimenFacade\r
+                               .getCollectingAreas().size());\r
+\r
        }\r
 \r
-       \r
-       \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAbsoluteElevation()}. \r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAbsoluteElevation()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetAbsoluteElevation() {\r
-               Assert.assertEquals("Absolute elevation must be same",absoluteElevation, specimenFacade.getAbsoluteElevation());\r
+               Assert.assertEquals("Absolute elevation must be same",\r
+                               absoluteElevation, specimenFacade.getAbsoluteElevation());\r
                specimenFacade.setAbsoluteElevation(400);\r
-               Assert.assertEquals("Absolute elevation must be 400", Integer.valueOf(400), specimenFacade.getAbsoluteElevation());\r
+               Assert.assertEquals("Absolute elevation must be 400",\r
+                               Integer.valueOf(400), specimenFacade.getAbsoluteElevation());\r
        }\r
 \r
-\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAbsoluteElevationError()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAbsoluteElevationError()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetAbsoluteElevationError() {\r
-               Assert.assertEquals("Absolute elevation error must be same",absoluteElevationError, specimenFacade.getAbsoluteElevationError());\r
+               Assert.assertEquals("Absolute elevation error must be same",\r
+                               absoluteElevationError,\r
+                               specimenFacade.getAbsoluteElevationError());\r
                specimenFacade.setAbsoluteElevationError(4);\r
-               Assert.assertEquals("Absolute elevation error must be 4", Integer.valueOf(4), specimenFacade.getAbsoluteElevationError());\r
+               Assert.assertEquals("Absolute elevation error must be 4",\r
+                               Integer.valueOf(4), specimenFacade.getAbsoluteElevationError());\r
        }\r
-       \r
+\r
        @Test()\r
-       public void testGetSetAbsoluteElevationRange(){\r
-               Integer expected = absoluteElevation - 2 ;\r
-               Assert.assertEquals("", expected,specimenFacade.getAbsoluteElevationMinimum());\r
-               expected = absoluteElevation + 2 ;\r
-               Assert.assertEquals("", expected,specimenFacade.getAbsoluteElevationMaximum());\r
+       public void testGetSetAbsoluteElevationRange() {\r
+               Integer expected = absoluteElevation - 2;\r
+               Assert.assertEquals("", expected,\r
+                               specimenFacade.getAbsoluteElevationMinimum());\r
+               expected = absoluteElevation + 2;\r
+               Assert.assertEquals("", expected,\r
+                               specimenFacade.getAbsoluteElevationMaximum());\r
                specimenFacade.setAbsoluteElevationRange(30, 36);\r
-               Assert.assertEquals("", Integer.valueOf(36), specimenFacade.getAbsoluteElevationMaximum());\r
-               Assert.assertEquals("", Integer.valueOf(30), specimenFacade.getAbsoluteElevationMinimum());\r
+               Assert.assertEquals("", Integer.valueOf(36),\r
+                               specimenFacade.getAbsoluteElevationMaximum());\r
+               Assert.assertEquals("", Integer.valueOf(30),\r
+                               specimenFacade.getAbsoluteElevationMinimum());\r
                try {\r
                        specimenFacade.setAbsoluteElevationRange(30, 35);\r
                        Assert.fail("Odd distance needs to throw IllegalArgumentException");\r
@@ -476,629 +552,947 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
                        Assert.assertTrue("Exception needs to be thrown", true);\r
                }\r
                specimenFacade.setAbsoluteElevationRange(41, null);\r
-               Assert.assertEquals("", Integer.valueOf(41), specimenFacade.getAbsoluteElevationMaximum());\r
-               Assert.assertEquals("", Integer.valueOf(41), specimenFacade.getAbsoluteElevationMinimum());\r
-               Assert.assertEquals("", Integer.valueOf(41), specimenFacade.getAbsoluteElevation());\r
+               Assert.assertEquals("", Integer.valueOf(41),\r
+                               specimenFacade.getAbsoluteElevationMaximum());\r
+               Assert.assertEquals("", Integer.valueOf(41),\r
+                               specimenFacade.getAbsoluteElevationMinimum());\r
+               Assert.assertEquals("", Integer.valueOf(41),\r
+                               specimenFacade.getAbsoluteElevation());\r
                Assert.assertNotNull("", specimenFacade.getAbsoluteElevationError());\r
-               Assert.assertEquals("", Integer.valueOf(0), specimenFacade.getAbsoluteElevationError());\r
+               Assert.assertEquals("", Integer.valueOf(0),\r
+                               specimenFacade.getAbsoluteElevationError());\r
                specimenFacade.setAbsoluteElevationRange(null, null);\r
                Assert.assertNull("", specimenFacade.getAbsoluteElevation());\r
                Assert.assertNull("", specimenFacade.getAbsoluteElevationError());\r
-               \r
-               \r
+\r
        }\r
-       \r
 \r
        /**\r
         */\r
        @Test\r
        public void testGetSetCollector() {\r
-               Assert.assertNotNull("Collector must not be null", specimenFacade.getCollector());      \r
-               Assert.assertEquals("Collector must be same",collector, specimenFacade.getCollector()); \r
+               Assert.assertNotNull("Collector must not be null",\r
+                               specimenFacade.getCollector());\r
+               Assert.assertEquals("Collector must be same", collector,\r
+                               specimenFacade.getCollector());\r
                specimenFacade.setCollector(null);\r
-               Assert.assertNull("Collector must be null", specimenFacade.getCollector());     \r
+               Assert.assertNull("Collector must be null",\r
+                               specimenFacade.getCollector());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollectingMethod()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollectingMethod()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetCollectingMethod() {\r
-               Assert.assertEquals("Collecting method must be same", collectingMethod, specimenFacade.getCollectingMethod());\r
+               Assert.assertEquals("Collecting method must be same", collectingMethod,\r
+                               specimenFacade.getCollectingMethod());\r
                specimenFacade.setCollectingMethod("new method");\r
-               Assert.assertEquals("Collecting method must be 'new method'","new method", specimenFacade.getCollectingMethod());       \r
+               Assert.assertEquals("Collecting method must be 'new method'",\r
+                               "new method", specimenFacade.getCollectingMethod());\r
        }\r
 \r
-\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getDistanceToGround()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getDistanceToGround()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetDistanceToGround() {\r
-               Assert.assertEquals("Distance to ground must be same",distanceToGround, specimenFacade.getDistanceToGround());\r
+               Assert.assertEquals("Distance to ground must be same",\r
+                               distanceToGround, specimenFacade.getDistanceToGround());\r
                specimenFacade.setDistanceToGround(5);\r
-               Assert.assertEquals("Distance to ground must be 5", Integer.valueOf(5), specimenFacade.getDistanceToGround());\r
+               Assert.assertEquals("Distance to ground must be 5", Integer.valueOf(5),\r
+                               specimenFacade.getDistanceToGround());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getDistanceToWaterSurface()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getDistanceToWaterSurface()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetDistanceToWaterSurface() {\r
-               Assert.assertEquals("Distance to surface must be same", distanceToSurface, specimenFacade.getDistanceToWaterSurface());\r
+               Assert.assertEquals("Distance to surface must be same",\r
+                               distanceToSurface, specimenFacade.getDistanceToWaterSurface());\r
                specimenFacade.setDistanceToWaterSurface(6);\r
-               Assert.assertEquals("Distance to surface must be 6", Integer.valueOf(6), specimenFacade.getDistanceToWaterSurface());\r
-               //empty facade tests\r
-               Assert.assertNull("Empty facace must not have any gathering values" ,emptyFacade.getDistanceToWaterSurface());\r
+               Assert.assertEquals("Distance to surface must be 6",\r
+                               Integer.valueOf(6), specimenFacade.getDistanceToWaterSurface());\r
+               // empty facade tests\r
+               Assert.assertNull("Empty facace must not have any gathering values",\r
+                               emptyFacade.getDistanceToWaterSurface());\r
                emptyFacade.setDistanceToWaterSurface(13);\r
-               Assert.assertNotNull("Field observation must exist if distance to water exists", emptyFacade.getFieldObservation(false));\r
-               Assert.assertNotNull("Gathering event must exist if distance to water exists", emptyFacade.getGatheringEvent(false));\r
-               FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.innerDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
-               Assert.assertSame("Gathering event of facade and of specimen must be the same", specimenFieldObservation.getGatheringEvent(), emptyFacade.getGatheringEvent(false));\r
+               Assert.assertNotNull(\r
+                               "Field observation must exist if distance to water exists",\r
+                               emptyFacade.getFieldObservation(false));\r
+               Assert.assertNotNull(\r
+                               "Gathering event must exist if distance to water exists",\r
+                               emptyFacade.getGatheringEvent(false));\r
+               FieldObservation specimenFieldObservation = (FieldObservation) emptyFacade\r
+                               .innerDerivedUnit().getDerivedFrom().getOriginals().iterator()\r
+                               .next();\r
+               Assert.assertSame(\r
+                               "Gathering event of facade and of specimen must be the same",\r
+                               specimenFieldObservation.getGatheringEvent(),\r
+                               emptyFacade.getGatheringEvent(false));\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getExactLocation()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getExactLocation()}.\r
         */\r
        @Test\r
        public void testGetSetExactLocation() {\r
-               Assert.assertNotNull("Exact location must not be null", specimenFacade.getExactLocation());     \r
-               Assert.assertEquals("Exact location must be same", exactLocation, specimenFacade.getExactLocation());   \r
+               Assert.assertNotNull("Exact location must not be null",\r
+                               specimenFacade.getExactLocation());\r
+               Assert.assertEquals("Exact location must be same", exactLocation,\r
+                               specimenFacade.getExactLocation());\r
                specimenFacade.setExactLocation(null);\r
-               Assert.assertNull("Exact location must be null", specimenFacade.getExactLocation());    \r
+               Assert.assertNull("Exact location must be null",\r
+                               specimenFacade.getExactLocation());\r
        }\r
-       \r
+\r
        @Test\r
-       public void testSetExactLocationByParsing(){\r
+       public void testSetExactLocationByParsing() {\r
                Point point1;\r
                try {\r
-                       specimenFacade.setExactLocationByParsing("112\u00B034'20\"W", "34\u00B030,34'N", null, null);\r
+                       specimenFacade.setExactLocationByParsing("112\u00B034'20\"W",\r
+                                       "34\u00B030,34'N", null, null);\r
                        point1 = specimenFacade.getExactLocation();\r
                        Assert.assertNotNull("", point1.getLatitude());\r
                        System.out.println(point1.getLatitude().toString());\r
-                       Assert.assertTrue("", point1.getLatitude().toString().startsWith("34.505"));\r
+                       Assert.assertTrue("",\r
+                                       point1.getLatitude().toString().startsWith("34.505"));\r
                        System.out.println(point1.getLongitude().toString());\r
-                       Assert.assertTrue("", point1.getLongitude().toString().startsWith("-112.5722"));\r
-                       \r
+                       Assert.assertTrue("",\r
+                                       point1.getLongitude().toString().startsWith("-112.5722"));\r
+\r
                } catch (ParseException e) {\r
                        Assert.fail("No parsing error should occur");\r
                }\r
        }\r
 \r
-\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getGatheringEventDescription()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getGatheringEventDescription()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetGatheringEventDescription() {\r
-               Assert.assertEquals("Gathering event description must be same", gatheringEventDescription, specimenFacade.getGatheringEventDescription());\r
+               Assert.assertEquals("Gathering event description must be same",\r
+                               gatheringEventDescription,\r
+                               specimenFacade.getGatheringEventDescription());\r
                specimenFacade.setGatheringEventDescription("new description");\r
-               Assert.assertEquals("Gathering event description must be 'new description' now","new description", specimenFacade.getGatheringEventDescription());      \r
+               Assert.assertEquals(\r
+                               "Gathering event description must be 'new description' now",\r
+                               "new description",\r
+                               specimenFacade.getGatheringEventDescription());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getTimeperiod()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getTimeperiod()}.\r
         */\r
        @Test\r
        public void testGetTimeperiod() {\r
-               Assert.assertNotNull("Gathering period must not be null", specimenFacade.getGatheringPeriod()); \r
-               Assert.assertEquals("Gathering period must be same", gatheringPeriod, specimenFacade.getGatheringPeriod());     \r
+               Assert.assertNotNull("Gathering period must not be null",\r
+                               specimenFacade.getGatheringPeriod());\r
+               Assert.assertEquals("Gathering period must be same", gatheringPeriod,\r
+                               specimenFacade.getGatheringPeriod());\r
                specimenFacade.setGatheringPeriod(null);\r
-               Assert.assertNull("Gathering period must be null", specimenFacade.getGatheringPeriod());        \r
+               Assert.assertNull("Gathering period must be null",\r
+                               specimenFacade.getGatheringPeriod());\r
        }\r
 \r
-       @Test \r
-       public void testHasFieldObject() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException{\r
-               // this test depends on the current implementation of SpecimenFacade. In future\r
-               // field observation may not be initialized from the beginning. Than the following \r
+       @Test\r
+       public void testHasFieldObject() throws SecurityException,\r
+                       NoSuchFieldException, IllegalArgumentException,\r
+                       IllegalAccessException {\r
+               // this test depends on the current implementation of SpecimenFacade. In\r
+               // future\r
+               // field observation may not be initialized from the beginning. Than the\r
+               // following\r
                // assert should be set to assertNull\r
-               Assert.assertTrue("field object should not be null (depends on specimen facade initialization !!)", specimenFacade.hasFieldObject());\r
+               Assert.assertTrue(\r
+                               "field object should not be null (depends on specimen facade initialization !!)",\r
+                               specimenFacade.hasFieldObject());\r
 \r
-               Field fieldObservationField = DerivedUnitFacade.class.getDeclaredField("fieldObservation");\r
+               Field fieldObservationField = DerivedUnitFacade.class\r
+                               .getDeclaredField("fieldObservation");\r
                fieldObservationField.setAccessible(true);\r
                fieldObservationField.set(specimenFacade, null);\r
-               Assert.assertFalse("The field observation should be null now", specimenFacade.hasFieldObject());\r
-       \r
+               Assert.assertFalse("The field observation should be null now",\r
+                               specimenFacade.hasFieldObject());\r
+\r
                specimenFacade.setDistanceToGround(33);\r
-               Assert.assertTrue("The field observation should have been created again", specimenFacade.hasFieldObject());\r
+               Assert.assertTrue(\r
+                               "The field observation should have been created again",\r
+                               specimenFacade.hasFieldObject());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectDefinition(java.lang.String, eu.etaxonomy.cdm.model.common.Language)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectDefinition(java.lang.String, eu.etaxonomy.cdm.model.common.Language)}\r
+        * .\r
         */\r
        @Test\r
        public void testAddGetRemoveFieldObjectDefinition() {\r
-               Assert.assertEquals("There should be no definition yet", 0, specimenFacade.getFieldObjectDefinition().size());\r
-               specimenFacade.addFieldObjectDefinition("Tres interesant", Language.FRENCH());\r
-               Assert.assertEquals("There should be exactly one definition", 1, specimenFacade.getFieldObjectDefinition().size());\r
-               Assert.assertEquals("The French definition should be 'Tres interesant'", "Tres interesant", specimenFacade.getFieldObjectDefinition().get(Language.FRENCH()).getText());\r
-               Assert.assertEquals("The French definition should be 'Tres interesant'", "Tres interesant", specimenFacade.getFieldObjectDefinition(Language.FRENCH()));\r
-               specimenFacade.addFieldObjectDefinition("Sehr interessant", Language.GERMAN());\r
-               Assert.assertEquals("There should be exactly 2 definition", 2, specimenFacade.getFieldObjectDefinition().size());\r
+               Assert.assertEquals("There should be no definition yet", 0,\r
+                               specimenFacade.getFieldObjectDefinition().size());\r
+               specimenFacade.addFieldObjectDefinition("Tres interesant",\r
+                               Language.FRENCH());\r
+               Assert.assertEquals("There should be exactly one definition", 1,\r
+                               specimenFacade.getFieldObjectDefinition().size());\r
+               Assert.assertEquals(\r
+                               "The French definition should be 'Tres interesant'",\r
+                               "Tres interesant", specimenFacade.getFieldObjectDefinition()\r
+                                               .get(Language.FRENCH()).getText());\r
+               Assert.assertEquals(\r
+                               "The French definition should be 'Tres interesant'",\r
+                               "Tres interesant",\r
+                               specimenFacade.getFieldObjectDefinition(Language.FRENCH()));\r
+               specimenFacade.addFieldObjectDefinition("Sehr interessant",\r
+                               Language.GERMAN());\r
+               Assert.assertEquals("There should be exactly 2 definition", 2,\r
+                               specimenFacade.getFieldObjectDefinition().size());\r
                specimenFacade.removeFieldObjectDefinition(Language.FRENCH());\r
-               Assert.assertEquals("There should remain exactly 1 definition", 1, specimenFacade.getFieldObjectDefinition().size());\r
-               Assert.assertEquals("The remaining German definition should be 'Sehr interessant'", "Sehr interessant", specimenFacade.getFieldObjectDefinition(Language.GERMAN()));\r
+               Assert.assertEquals("There should remain exactly 1 definition", 1,\r
+                               specimenFacade.getFieldObjectDefinition().size());\r
+               Assert.assertEquals(\r
+                               "The remaining German definition should be 'Sehr interessant'",\r
+                               "Sehr interessant",\r
+                               specimenFacade.getFieldObjectDefinition(Language.GERMAN()));\r
                specimenFacade.removeFieldObjectDefinition(Language.GERMAN());\r
-               Assert.assertEquals("There should remain no definition", 0, specimenFacade.getFieldObjectDefinition().size());\r
+               Assert.assertEquals("There should remain no definition", 0,\r
+                               specimenFacade.getFieldObjectDefinition().size());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}\r
+        * .\r
         */\r
        @Test\r
        public void testAddGetHasRemoveFieldObjectMedia() {\r
-               Assert.assertFalse("There should be no image gallery yet", specimenFacade.hasFieldObjectImageGallery());\r
-               Assert.assertFalse("There should be no specimen image gallery either", specimenFacade.hasDerivedUnitImageGallery());\r
-               \r
+               Assert.assertFalse("There should be no image gallery yet",\r
+                               specimenFacade.hasFieldObjectImageGallery());\r
+               Assert.assertFalse("There should be no specimen image gallery either",\r
+                               specimenFacade.hasDerivedUnitImageGallery());\r
+\r
                List<Media> media = specimenFacade.getFieldObjectMedia();\r
-               Assert.assertFalse("There should still not be an image gallery now", specimenFacade.hasFieldObjectImageGallery());\r
-               Assert.assertEquals("There should be no media yet in the gallery", 0, media.size());\r
-               \r
+               Assert.assertFalse("There should still not be an image gallery now",\r
+                               specimenFacade.hasFieldObjectImageGallery());\r
+               Assert.assertEquals("There should be no media yet in the gallery", 0,\r
+                               media.size());\r
+\r
                Media media1 = Media.NewInstance();\r
                specimenFacade.addFieldObjectMedia(media1);\r
-               Assert.assertEquals("There should be exactly one specimen media", 1, specimenFacade.getFieldObjectMedia().size());\r
-               Assert.assertEquals("The only media should be media 1", media1, specimenFacade.getFieldObjectMedia().get(0));\r
-               Assert.assertFalse("There should still no specimen image gallery exist", specimenFacade.hasDerivedUnitImageGallery());\r
-               \r
+               Assert.assertEquals("There should be exactly one specimen media", 1,\r
+                               specimenFacade.getFieldObjectMedia().size());\r
+               Assert.assertEquals("The only media should be media 1", media1,\r
+                               specimenFacade.getFieldObjectMedia().get(0));\r
+               Assert.assertFalse(\r
+                               "There should still no specimen image gallery exist",\r
+                               specimenFacade.hasDerivedUnitImageGallery());\r
+\r
                Media media2 = Media.NewInstance();\r
                specimenFacade.addFieldObjectMedia(media2);\r
-               Assert.assertEquals("There should be exactly 2 specimen media", 2, specimenFacade.getFieldObjectMedia().size());\r
-               Assert.assertEquals("The first media should be media1", media1, specimenFacade.getFieldObjectMedia().get(0));\r
-               Assert.assertEquals("The second media should be media2", media2, specimenFacade.getFieldObjectMedia().get(1));\r
-               \r
+               Assert.assertEquals("There should be exactly 2 specimen media", 2,\r
+                               specimenFacade.getFieldObjectMedia().size());\r
+               Assert.assertEquals("The first media should be media1", media1,\r
+                               specimenFacade.getFieldObjectMedia().get(0));\r
+               Assert.assertEquals("The second media should be media2", media2,\r
+                               specimenFacade.getFieldObjectMedia().get(1));\r
+\r
                specimenFacade.removeFieldObjectMedia(media1);\r
-               Assert.assertEquals("There should be exactly one specimen media", 1, specimenFacade.getFieldObjectMedia().size());\r
-               Assert.assertEquals("The only media should be media2", media2, specimenFacade.getFieldObjectMedia().get(0));\r
+               Assert.assertEquals("There should be exactly one specimen media", 1,\r
+                               specimenFacade.getFieldObjectMedia().size());\r
+               Assert.assertEquals("The only media should be media2", media2,\r
+                               specimenFacade.getFieldObjectMedia().get(0));\r
 \r
                specimenFacade.removeFieldObjectMedia(media1);\r
-               Assert.assertEquals("There should still be exactly one specimen media", 1, specimenFacade.getFieldObjectMedia().size());\r
-               \r
+               Assert.assertEquals("There should still be exactly one specimen media",\r
+                               1, specimenFacade.getFieldObjectMedia().size());\r
+\r
                specimenFacade.removeFieldObjectMedia(media2);\r
-               Assert.assertEquals("There should remain no media in the gallery", 0, media.size());\r
+               Assert.assertEquals("There should remain no media in the gallery", 0,\r
+                               media.size());\r
 \r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetEcology() {\r
-               Assert.assertNotNull("An empty ecology data should be created when calling getEcology()", specimenFacade.getEcologyAll());\r
-               Assert.assertEquals("An empty ecology data should be created when calling getEcology()", 0, specimenFacade.getEcologyAll().size());\r
+               Assert.assertNotNull(\r
+                               "An empty ecology data should be created when calling getEcology()",\r
+                               specimenFacade.getEcologyAll());\r
+               Assert.assertEquals(\r
+                               "An empty ecology data should be created when calling getEcology()",\r
+                               0, specimenFacade.getEcologyAll().size());\r
                specimenFacade.setEcology("Tres jolie ici", Language.FRENCH());\r
-               Assert.assertEquals("Ecology data should exist for 1 language", 1, specimenFacade.getEcologyAll().size());\r
-               Assert.assertEquals("Ecology data should be 'Tres jolie ici' for French", "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
-               Assert.assertNull("Ecology data should be null for the default language", specimenFacade.getEcology());\r
+               Assert.assertEquals("Ecology data should exist for 1 language", 1,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertEquals(\r
+                               "Ecology data should be 'Tres jolie ici' for French",\r
+                               "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
+               Assert.assertNull(\r
+                               "Ecology data should be null for the default language",\r
+                               specimenFacade.getEcology());\r
                specimenFacade.setEcology("Nice here");\r
-               Assert.assertEquals("Ecology data should exist for 2 languages", 2, specimenFacade.getEcologyAll().size());\r
-               Assert.assertEquals("Ecology data should be 'Tres jolie ici'", "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
-               Assert.assertEquals("Ecology data should be 'Nice here' for the default language", "Nice here", specimenFacade.getEcology());\r
-               Assert.assertEquals("Ecology data should be 'Nice here' for english", "Nice here", specimenFacade.getEcology());\r
-               \r
+               Assert.assertEquals("Ecology data should exist for 2 languages", 2,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertEquals("Ecology data should be 'Tres jolie ici'",\r
+                               "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
+               Assert.assertEquals(\r
+                               "Ecology data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getEcology());\r
+               Assert.assertEquals("Ecology data should be 'Nice here' for english",\r
+                               "Nice here", specimenFacade.getEcology());\r
+\r
                specimenFacade.setEcology("Vert et rouge", Language.FRENCH());\r
-               Assert.assertEquals("Ecology data should exist for 2 languages", 2, specimenFacade.getEcologyAll().size());\r
-               Assert.assertEquals("Ecology data should be 'Vert et rouge'", "Vert et rouge", specimenFacade.getEcology(Language.FRENCH()));\r
-               Assert.assertEquals("Ecology data should be 'Nice here' for the default language", "Nice here", specimenFacade.getEcology());\r
-               \r
+               Assert.assertEquals("Ecology data should exist for 2 languages", 2,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertEquals("Ecology data should be 'Vert et rouge'",\r
+                               "Vert et rouge", specimenFacade.getEcology(Language.FRENCH()));\r
+               Assert.assertEquals(\r
+                               "Ecology data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getEcology());\r
+\r
                specimenFacade.setEcology(null, Language.FRENCH());\r
-               Assert.assertEquals("Ecology data should exist for 1 languages", 1, specimenFacade.getEcologyAll().size());\r
-               Assert.assertEquals("Ecology data should be 'Nice here' for the default language", "Nice here", specimenFacade.getEcology());\r
-               Assert.assertNull("Ecology data should be 'null' for French", specimenFacade.getEcology(Language.FRENCH()));\r
-               \r
+               Assert.assertEquals("Ecology data should exist for 1 languages", 1,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertEquals(\r
+                               "Ecology data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getEcology());\r
+               Assert.assertNull("Ecology data should be 'null' for French",\r
+                               specimenFacade.getEcology(Language.FRENCH()));\r
+\r
                specimenFacade.removeEcology(null);\r
-               Assert.assertEquals("There should be no ecology left", 0, specimenFacade.getEcologyAll().size());\r
-               Assert.assertNull("Ecology data should be 'null' for default language", specimenFacade.getEcology());\r
-               \r
+               Assert.assertEquals("There should be no ecology left", 0,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertNull("Ecology data should be 'null' for default language",\r
+                               specimenFacade.getEcology());\r
+\r
        }\r
-       \r
+\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addFieldObjectMedia(eu.etaxonomy.cdm.model.media.Media)}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetPlantDescription() {\r
-               Assert.assertNotNull("An empty plant description data should be created when calling getPlantDescriptionAll()", specimenFacade.getPlantDescriptionAll());\r
-               Assert.assertEquals("An empty plant description data should be created when calling getPlantDescription()", 0, specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertNotNull(\r
+                               "An empty plant description data should be created when calling getPlantDescriptionAll()",\r
+                               specimenFacade.getPlantDescriptionAll());\r
+               Assert.assertEquals(\r
+                               "An empty plant description data should be created when calling getPlantDescription()",\r
+                               0, specimenFacade.getPlantDescriptionAll().size());\r
                specimenFacade.setPlantDescription("bleu", Language.FRENCH());\r
-               Assert.assertEquals("Plant description data should exist for 1 language", 1, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertEquals("Plant description data should be 'bleu' for French", "bleu", specimenFacade.getPlantDescription(Language.FRENCH()));\r
-               Assert.assertNull("Plant description data should be null for the default language", specimenFacade.getPlantDescription());\r
+               Assert.assertEquals(\r
+                               "Plant description data should exist for 1 language", 1,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'bleu' for French", "bleu",\r
+                               specimenFacade.getPlantDescription(Language.FRENCH()));\r
+               Assert.assertNull(\r
+                               "Plant description data should be null for the default language",\r
+                               specimenFacade.getPlantDescription());\r
                specimenFacade.setPlantDescription("Nice here");\r
-               Assert.assertEquals("Plant description data should exist for 2 languages", 2, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertEquals("Plant description data should be 'bleu'", "bleu", specimenFacade.getPlantDescription(Language.FRENCH()));\r
-               Assert.assertEquals("Plant description data should be 'Nice here' for the default language", "Nice here", specimenFacade.getPlantDescription());\r
-               Assert.assertEquals("Plant description data should be 'Nice here' for english", "Nice here", specimenFacade.getPlantDescription());\r
-               \r
+               Assert.assertEquals(\r
+                               "Plant description data should exist for 2 languages", 2,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertEquals("Plant description data should be 'bleu'", "bleu",\r
+                               specimenFacade.getPlantDescription(Language.FRENCH()));\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getPlantDescription());\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'Nice here' for english",\r
+                               "Nice here", specimenFacade.getPlantDescription());\r
+\r
                specimenFacade.setPlantDescription("Vert et rouge", Language.FRENCH());\r
-               Assert.assertEquals("Plant description data should exist for 2 languages", 2, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertEquals("Plant description data should be 'Vert et rouge'", "Vert et rouge", specimenFacade.getPlantDescription(Language.FRENCH()));\r
-               Assert.assertEquals("Plant description data should be 'Nice here' for the default language", "Nice here", specimenFacade.getPlantDescription());\r
-               \r
+               Assert.assertEquals(\r
+                               "Plant description data should exist for 2 languages", 2,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertEquals("Plant description data should be 'Vert et rouge'",\r
+                               "Vert et rouge",\r
+                               specimenFacade.getPlantDescription(Language.FRENCH()));\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getPlantDescription());\r
+\r
                specimenFacade.setPlantDescription(null, Language.FRENCH());\r
-               Assert.assertEquals("Plant description data should exist for 1 languages", 1, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertEquals("Plant description data should be 'Nice here' for the default language", "Nice here", specimenFacade.getPlantDescription());\r
-               Assert.assertNull("Plant description data should be 'null' for French", specimenFacade.getPlantDescription(Language.FRENCH()));\r
-               \r
-               //test interference with ecology\r
+               Assert.assertEquals(\r
+                               "Plant description data should exist for 1 languages", 1,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getPlantDescription());\r
+               Assert.assertNull("Plant description data should be 'null' for French",\r
+                               specimenFacade.getPlantDescription(Language.FRENCH()));\r
+\r
+               // test interference with ecology\r
                specimenFacade.setEcology("Tres jolie ici", Language.FRENCH());\r
-               Assert.assertEquals("Ecology data should exist for 1 language", 1, specimenFacade.getEcologyAll().size());\r
-               Assert.assertEquals("Ecology data should be 'Tres jolie ici' for French", "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
-               Assert.assertNull("Ecology data should be null for the default language", specimenFacade.getEcology());\r
-               \r
-               //repeat above test\r
-               Assert.assertEquals("Plant description data should exist for 1 languages", 1, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertEquals("Plant description data should be 'Nice here' for the default language", "Nice here", specimenFacade.getPlantDescription());\r
-               Assert.assertNull("Plant description data should be 'null' for French", specimenFacade.getPlantDescription(Language.FRENCH()));\r
-               \r
-               \r
+               Assert.assertEquals("Ecology data should exist for 1 language", 1,\r
+                               specimenFacade.getEcologyAll().size());\r
+               Assert.assertEquals(\r
+                               "Ecology data should be 'Tres jolie ici' for French",\r
+                               "Tres jolie ici", specimenFacade.getEcology(Language.FRENCH()));\r
+               Assert.assertNull(\r
+                               "Ecology data should be null for the default language",\r
+                               specimenFacade.getEcology());\r
+\r
+               // repeat above test\r
+               Assert.assertEquals(\r
+                               "Plant description data should exist for 1 languages", 1,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertEquals(\r
+                               "Plant description data should be 'Nice here' for the default language",\r
+                               "Nice here", specimenFacade.getPlantDescription());\r
+               Assert.assertNull("Plant description data should be 'null' for French",\r
+                               specimenFacade.getPlantDescription(Language.FRENCH()));\r
+\r
                specimenFacade.removePlantDescription(null);\r
-               Assert.assertEquals("There should be no plant description left", 0, specimenFacade.getPlantDescriptionAll().size());\r
-               Assert.assertNull("Plant description data should be 'null' for default language", specimenFacade.getPlantDescription());\r
-               \r
+               Assert.assertEquals("There should be no plant description left", 0,\r
+                               specimenFacade.getPlantDescriptionAll().size());\r
+               Assert.assertNull(\r
+                               "Plant description data should be 'null' for default language",\r
+                               specimenFacade.getPlantDescription());\r
+\r
        }\r
-       \r
+\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getFieldNumber()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getFieldNumber()}.\r
         */\r
        @Test\r
        public void testGetSetFieldNumber() {\r
-               Assert.assertEquals("Field number must be same", fieldNumber, specimenFacade.getFieldNumber());\r
+               Assert.assertEquals("Field number must be same", fieldNumber,\r
+                               specimenFacade.getFieldNumber());\r
                specimenFacade.setFieldNumber("564AB");\r
-               Assert.assertEquals("New field number must be '564AB'", "564AB", specimenFacade.getFieldNumber());\r
-               //empty facade tests\r
-               Assert.assertNull("Empty facace must not have any field value" ,emptyFacade.getFieldNumber());\r
+               Assert.assertEquals("New field number must be '564AB'", "564AB",\r
+                               specimenFacade.getFieldNumber());\r
+               // empty facade tests\r
+               Assert.assertNull("Empty facace must not have any field value",\r
+                               emptyFacade.getFieldNumber());\r
                emptyFacade.setFieldNumber("1256A");\r
-               Assert.assertNotNull("Field observation must exist if field number exists", emptyFacade.getFieldObservation(false));\r
-               FieldObservation specimenFieldObservation = (FieldObservation)emptyFacade.innerDerivedUnit().getDerivedFrom().getOriginals().iterator().next();\r
-               Assert.assertSame("Field observation of facade and of specimen must be the same", specimenFieldObservation, emptyFacade.getFieldObservation(false));\r
+               Assert.assertNotNull(\r
+                               "Field observation must exist if field number exists",\r
+                               emptyFacade.getFieldObservation(false));\r
+               FieldObservation specimenFieldObservation = (FieldObservation) emptyFacade\r
+                               .innerDerivedUnit().getDerivedFrom().getOriginals().iterator()\r
+                               .next();\r
+               Assert.assertSame(\r
+                               "Field observation of facade and of specimen must be the same",\r
+                               specimenFieldObservation,\r
+                               emptyFacade.getFieldObservation(false));\r
                Assert.assertEquals("1256A", emptyFacade.getFieldNumber());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getFieldNotes()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getFieldNotes()}.\r
         */\r
        @Test\r
-       public void testGetSetFieldNotes()  {\r
-               Assert.assertEquals("Field notes must be same", fieldNotes, specimenFacade.getFieldNotes());\r
+       public void testGetSetFieldNotes() {\r
+               Assert.assertEquals("Field notes must be same", fieldNotes,\r
+                               specimenFacade.getFieldNotes());\r
                specimenFacade.setFieldNotes("A completely new info");\r
-               Assert.assertEquals("New field note must be 'A completely new info'", "A completely new info", specimenFacade.getFieldNotes());\r
+               Assert.assertEquals("New field note must be 'A completely new info'",\r
+                               "A completely new info", specimenFacade.getFieldNotes());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#setGatheringEvent(eu.etaxonomy.cdm.model.occurrence.GatheringEvent)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#setGatheringEvent(eu.etaxonomy.cdm.model.occurrence.GatheringEvent)}\r
+        * .\r
         */\r
        @Test\r
        public void testSetGatheringEvent() {\r
                GatheringEvent newGatheringEvent = GatheringEvent.NewInstance();\r
                newGatheringEvent.setDistanceToGround(43);\r
-               Assert.assertFalse("The initial distance to ground should not be 43", specimenFacade.getDistanceToGround() == 43);\r
+               Assert.assertFalse("The initial distance to ground should not be 43",\r
+                               specimenFacade.getDistanceToGround() == 43);\r
                specimenFacade.setGatheringEvent(newGatheringEvent);\r
-               Assert.assertTrue("The final distance to ground should be 43", specimenFacade.getDistanceToGround() == 43);\r
-               Assert.assertSame("The new gathering event should be 'newGatheringEvent'", newGatheringEvent, specimenFacade.innerGatheringEvent());\r
+               Assert.assertTrue("The final distance to ground should be 43",\r
+                               specimenFacade.getDistanceToGround() == 43);\r
+               Assert.assertSame(\r
+                               "The new gathering event should be 'newGatheringEvent'",\r
+                               newGatheringEvent, specimenFacade.innerGatheringEvent());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerGatheringEvent()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerGatheringEvent()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetGatheringEvent() {\r
-               Assert.assertNotNull("Gathering event must not be null", specimenFacade.innerGatheringEvent()); \r
-               Assert.assertEquals("Gathering event must be field observations gathering event", specimenFacade.innerFieldObservation().getGatheringEvent(), specimenFacade.innerGatheringEvent());\r
+               Assert.assertNotNull("Gathering event must not be null",\r
+                               specimenFacade.innerGatheringEvent());\r
+               Assert.assertEquals(\r
+                               "Gathering event must be field observations gathering event",\r
+                               specimenFacade.innerFieldObservation().getGatheringEvent(),\r
+                               specimenFacade.innerGatheringEvent());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getIndividualCount()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getIndividualCount()}\r
+        * .\r
         */\r
        @Test\r
-       public void testGetSetIndividualCount(){\r
-               Assert.assertEquals("Individual count must be same", individualCount, specimenFacade.getIndividualCount());\r
+       public void testGetSetIndividualCount() {\r
+               Assert.assertEquals("Individual count must be same", individualCount,\r
+                               specimenFacade.getIndividualCount());\r
                specimenFacade.setIndividualCount(4);\r
-               Assert.assertEquals("New individual count must be '4'", Integer.valueOf(4), specimenFacade.getIndividualCount());\r
+               Assert.assertEquals("New individual count must be '4'",\r
+                               Integer.valueOf(4), specimenFacade.getIndividualCount());\r
 \r
        }\r
 \r
-\r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getLifeStage()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getLifeStage()}.\r
         */\r
        @Test\r
-       public void testGetSetLifeStage(){\r
-               Assert.assertNotNull("Life stage must not be null", specimenFacade.getLifeStage());     \r
-               Assert.assertEquals("Life stage must be same", lifeStage, specimenFacade.getLifeStage());       \r
+       public void testGetSetLifeStage() {\r
+               Assert.assertNotNull("Life stage must not be null",\r
+                               specimenFacade.getLifeStage());\r
+               Assert.assertEquals("Life stage must be same", lifeStage,\r
+                               specimenFacade.getLifeStage());\r
                specimenFacade.setLifeStage(null);\r
-               Assert.assertNull("Life stage must be null", specimenFacade.getLifeStage());    \r
+               Assert.assertNull("Life stage must be null",\r
+                               specimenFacade.getLifeStage());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getSex()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getSex()}.\r
         */\r
        @Test\r
        public void testGetSetSex() {\r
-               Assert.assertNotNull("Sex must not be null", specimenFacade.getSex());  \r
-               Assert.assertEquals("Sex must be same", sex, specimenFacade.getSex());  \r
+               Assert.assertNotNull("Sex must not be null", specimenFacade.getSex());\r
+               Assert.assertEquals("Sex must be same", sex, specimenFacade.getSex());\r
                specimenFacade.setSex(null);\r
-               Assert.assertNull("Sex must be null", specimenFacade.getSex()); \r
+               Assert.assertNull("Sex must be null", specimenFacade.getSex());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getLocality()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getLocality()}.\r
         */\r
        @Test\r
        public void testGetSetLocality() {\r
-               Assert.assertEquals("Locality must be same", locality, specimenFacade.getLocality());\r
+               Assert.assertEquals("Locality must be same", locality,\r
+                               specimenFacade.getLocality());\r
                specimenFacade.setLocality("A completely new place", Language.FRENCH());\r
-               Assert.assertEquals("New locality must be 'A completely new place'", "A completely new place", specimenFacade.getLocalityText());\r
-               Assert.assertEquals("New locality language must be French", Language.FRENCH(), specimenFacade.getLocalityLanguage());\r
+               Assert.assertEquals("New locality must be 'A completely new place'",\r
+                               "A completely new place", specimenFacade.getLocalityText());\r
+               Assert.assertEquals("New locality language must be French",\r
+                               Language.FRENCH(), specimenFacade.getLocalityLanguage());\r
                specimenFacade.setLocality("Another place");\r
-               Assert.assertEquals("New locality must be 'Another place'", "Another place", specimenFacade.getLocalityText());\r
-               Assert.assertEquals("New locality language must be default", Language.DEFAULT(), specimenFacade.getLocalityLanguage());         \r
+               Assert.assertEquals("New locality must be 'Another place'",\r
+                               "Another place", specimenFacade.getLocalityText());\r
+               Assert.assertEquals("New locality language must be default",\r
+                               Language.DEFAULT(), specimenFacade.getLocalityLanguage());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDerivedUnitDefinition(java.lang.String, eu.etaxonomy.cdm.model.common.Language)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDerivedUnitDefinition(java.lang.String, eu.etaxonomy.cdm.model.common.Language)}\r
+        * .\r
         */\r
        @Test\r
        public void testAddGetRemoveSpecimenDefinition() {\r
-               Assert.assertEquals("There should be no definition yet", 0, specimenFacade.getDerivedUnitDefinitions().size());\r
-               specimenFacade.addDerivedUnitDefinition("Tres interesant", Language.FRENCH());\r
-               Assert.assertEquals("There should be exactly one definition", 1, specimenFacade.getDerivedUnitDefinitions().size());\r
-               Assert.assertEquals("The French definition should be 'Tres interesant'", "Tres interesant", specimenFacade.getDerivedUnitDefinitions().get(Language.FRENCH()).getText());\r
-               Assert.assertEquals("The French definition should be 'Tres interesant'", "Tres interesant", specimenFacade.getDerivedUnitDefinition(Language.FRENCH()));\r
-               specimenFacade.addDerivedUnitDefinition("Sehr interessant", Language.GERMAN());\r
-               Assert.assertEquals("There should be exactly 2 definition", 2, specimenFacade.getDerivedUnitDefinitions().size());\r
+               Assert.assertEquals("There should be no definition yet", 0,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
+               specimenFacade.addDerivedUnitDefinition("Tres interesant",\r
+                               Language.FRENCH());\r
+               Assert.assertEquals("There should be exactly one definition", 1,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
+               Assert.assertEquals(\r
+                               "The French definition should be 'Tres interesant'",\r
+                               "Tres interesant", specimenFacade.getDerivedUnitDefinitions()\r
+                                               .get(Language.FRENCH()).getText());\r
+               Assert.assertEquals(\r
+                               "The French definition should be 'Tres interesant'",\r
+                               "Tres interesant",\r
+                               specimenFacade.getDerivedUnitDefinition(Language.FRENCH()));\r
+               specimenFacade.addDerivedUnitDefinition("Sehr interessant",\r
+                               Language.GERMAN());\r
+               Assert.assertEquals("There should be exactly 2 definition", 2,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
                specimenFacade.removeDerivedUnitDefinition(Language.FRENCH());\r
-               Assert.assertEquals("There should remain exactly 1 definition", 1, specimenFacade.getDerivedUnitDefinitions().size());\r
-               Assert.assertEquals("The remaining German definition should be 'Sehr interessant'", "Sehr interessant", specimenFacade.getDerivedUnitDefinition(Language.GERMAN()));\r
+               Assert.assertEquals("There should remain exactly 1 definition", 1,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
+               Assert.assertEquals(\r
+                               "The remaining German definition should be 'Sehr interessant'",\r
+                               "Sehr interessant",\r
+                               specimenFacade.getDerivedUnitDefinition(Language.GERMAN()));\r
                specimenFacade.removeDerivedUnitDefinition(Language.GERMAN());\r
-               Assert.assertEquals("There should remain no definition", 0, specimenFacade.getDerivedUnitDefinitions().size());\r
+               Assert.assertEquals("There should remain no definition", 0,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDetermination(eu.etaxonomy.cdm.model.occurrence.DeterminationEvent)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDetermination(eu.etaxonomy.cdm.model.occurrence.DeterminationEvent)}\r
+        * .\r
         */\r
        @Test\r
        public void testAddGetRemoveDetermination() {\r
-               Assert.assertEquals("There should be no determination yet", 0, specimenFacade.getDeterminations().size());\r
-               DeterminationEvent determinationEvent1 = DeterminationEvent.NewInstance();\r
+               Assert.assertEquals("There should be no determination yet", 0,\r
+                               specimenFacade.getDeterminations().size());\r
+               DeterminationEvent determinationEvent1 = DeterminationEvent\r
+                               .NewInstance();\r
                specimenFacade.addDetermination(determinationEvent1);\r
-               Assert.assertEquals("There should be exactly one determination", 1, specimenFacade.getDeterminations().size());\r
-               Assert.assertEquals("The only determination should be determination 1", determinationEvent1, specimenFacade.getDeterminations().iterator().next());\r
-\r
-               \r
-               DeterminationEvent determinationEvent2 = DeterminationEvent.NewInstance();\r
+               Assert.assertEquals("There should be exactly one determination", 1,\r
+                               specimenFacade.getDeterminations().size());\r
+               Assert.assertEquals("The only determination should be determination 1",\r
+                               determinationEvent1, specimenFacade.getDeterminations()\r
+                                               .iterator().next());\r
+\r
+               DeterminationEvent determinationEvent2 = DeterminationEvent\r
+                               .NewInstance();\r
                specimenFacade.addDetermination(determinationEvent2);\r
-               Assert.assertEquals("There should be exactly 2 determinations", 2, specimenFacade.getDeterminations().size());\r
+               Assert.assertEquals("There should be exactly 2 determinations", 2,\r
+                               specimenFacade.getDeterminations().size());\r
                specimenFacade.removeDetermination(determinationEvent1);\r
-               \r
-               Assert.assertEquals("There should remain exactly 1 determination", 1, specimenFacade.getDeterminations().size());\r
-               Assert.assertEquals("The remaining determinations should be determination 2", determinationEvent2, specimenFacade.getDeterminations().iterator().next());\r
-               \r
+\r
+               Assert.assertEquals("There should remain exactly 1 determination", 1,\r
+                               specimenFacade.getDeterminations().size());\r
+               Assert.assertEquals(\r
+                               "The remaining determinations should be determination 2",\r
+                               determinationEvent2, specimenFacade.getDeterminations()\r
+                                               .iterator().next());\r
+\r
                specimenFacade.removeDetermination(determinationEvent1);\r
-               Assert.assertEquals("There should remain exactly 1 determination", 1, specimenFacade.getDeterminations().size());\r
+               Assert.assertEquals("There should remain exactly 1 determination", 1,\r
+                               specimenFacade.getDeterminations().size());\r
 \r
                specimenFacade.removeDetermination(determinationEvent2);\r
-               Assert.assertEquals("There should remain no definition", 0, specimenFacade.getDerivedUnitDefinitions().size());\r
+               Assert.assertEquals("There should remain no definition", 0,\r
+                               specimenFacade.getDerivedUnitDefinitions().size());\r
 \r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDerivedUnitMedia(eu.etaxonomy.cdm.model.media.Media)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#addDerivedUnitMedia(eu.etaxonomy.cdm.model.media.Media)}\r
+        * .\r
         */\r
        @Test\r
        public void testAddGetHasRemoveSpecimenMedia() {\r
-               Assert.assertFalse("There should be no image gallery yet", specimenFacade.hasDerivedUnitImageGallery());\r
-               Assert.assertFalse("There should be also no field object image gallery yet", specimenFacade.hasFieldObjectImageGallery());\r
-               \r
+               Assert.assertFalse("There should be no image gallery yet",\r
+                               specimenFacade.hasDerivedUnitImageGallery());\r
+               Assert.assertFalse(\r
+                               "There should be also no field object image gallery yet",\r
+                               specimenFacade.hasFieldObjectImageGallery());\r
+\r
                List<Media> media = specimenFacade.getDerivedUnitMedia();\r
-               Assert.assertFalse("There should still not be an empty image gallery now", specimenFacade.hasDerivedUnitImageGallery());\r
-               Assert.assertEquals("There should be no media yet in the gallery", 0, media.size());\r
-               \r
+               Assert.assertFalse(\r
+                               "There should still not be an empty image gallery now",\r
+                               specimenFacade.hasDerivedUnitImageGallery());\r
+               Assert.assertEquals("There should be no media yet in the gallery", 0,\r
+                               media.size());\r
+\r
                Media media1 = Media.NewInstance();\r
                specimenFacade.addDerivedUnitMedia(media1);\r
-               Assert.assertEquals("There should be exactly one specimen media", 1, specimenFacade.getDerivedUnitMedia().size());\r
-               Assert.assertEquals("The only media should be media 1", media1, specimenFacade.getDerivedUnitMedia().get(0));\r
-               Assert.assertFalse("There should be still no field object image gallery", specimenFacade.hasFieldObjectImageGallery());\r
-               \r
+               Assert.assertEquals("There should be exactly one specimen media", 1,\r
+                               specimenFacade.getDerivedUnitMedia().size());\r
+               Assert.assertEquals("The only media should be media 1", media1,\r
+                               specimenFacade.getDerivedUnitMedia().get(0));\r
+               Assert.assertFalse(\r
+                               "There should be still no field object image gallery",\r
+                               specimenFacade.hasFieldObjectImageGallery());\r
+\r
                Media media2 = Media.NewInstance();\r
                specimenFacade.addDerivedUnitMedia(media2);\r
-               Assert.assertEquals("There should be exactly 2 specimen media", 2, specimenFacade.getDerivedUnitMedia().size());\r
-               Assert.assertEquals("The first media should be media1", media1, specimenFacade.getDerivedUnitMedia().get(0));\r
-               Assert.assertEquals("The second media should be media2", media2, specimenFacade.getDerivedUnitMedia().get(1));\r
-               \r
+               Assert.assertEquals("There should be exactly 2 specimen media", 2,\r
+                               specimenFacade.getDerivedUnitMedia().size());\r
+               Assert.assertEquals("The first media should be media1", media1,\r
+                               specimenFacade.getDerivedUnitMedia().get(0));\r
+               Assert.assertEquals("The second media should be media2", media2,\r
+                               specimenFacade.getDerivedUnitMedia().get(1));\r
+\r
                specimenFacade.removeDerivedUnitMedia(media1);\r
-               Assert.assertEquals("There should be exactly one specimen media", 1, specimenFacade.getDerivedUnitMedia().size());\r
-               Assert.assertEquals("The only media should be media2", media2, specimenFacade.getDerivedUnitMedia().get(0));\r
+               Assert.assertEquals("There should be exactly one specimen media", 1,\r
+                               specimenFacade.getDerivedUnitMedia().size());\r
+               Assert.assertEquals("The only media should be media2", media2,\r
+                               specimenFacade.getDerivedUnitMedia().get(0));\r
 \r
                specimenFacade.removeDerivedUnitMedia(media1);\r
-               Assert.assertEquals("There should still be exactly one specimen media", 1, specimenFacade.getDerivedUnitMedia().size());\r
-               \r
+               Assert.assertEquals("There should still be exactly one specimen media",\r
+                               1, specimenFacade.getDerivedUnitMedia().size());\r
+\r
                specimenFacade.removeDerivedUnitMedia(media2);\r
-               Assert.assertEquals("There should remain no media in the gallery", 0, media.size());\r
+               Assert.assertEquals("There should remain no media in the gallery", 0,\r
+                               media.size());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAccessionNumber()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getAccessionNumber()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetAccessionNumber() {\r
-               Assert.assertEquals("Accession number must be same", accessionNumber, specimenFacade.getAccessionNumber());\r
+               Assert.assertEquals("Accession number must be same", accessionNumber,\r
+                               specimenFacade.getAccessionNumber());\r
                specimenFacade.setAccessionNumber("A12345693");\r
-               Assert.assertEquals("New accession number must be 'A12345693'", "A12345693", specimenFacade.getAccessionNumber());\r
+               Assert.assertEquals("New accession number must be 'A12345693'",\r
+                               "A12345693", specimenFacade.getAccessionNumber());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCatalogNumber()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCatalogNumber()}.\r
         */\r
        @Test\r
        public void testGetCatalogNumber() {\r
-               Assert.assertEquals("Catalog number must be same", catalogNumber, specimenFacade.getCatalogNumber());\r
+               Assert.assertEquals("Catalog number must be same", catalogNumber,\r
+                               specimenFacade.getCatalogNumber());\r
                specimenFacade.setCatalogNumber("B12345693");\r
-               Assert.assertEquals("New catalog number must be 'B12345693'", "B12345693", specimenFacade.getCatalogNumber());\r
+               Assert.assertEquals("New catalog number must be 'B12345693'",\r
+                               "B12345693", specimenFacade.getCatalogNumber());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getPreservation()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getPreservation()}.\r
         */\r
        @Test\r
        public void testGetPreservation() {\r
                try {\r
-                       Assert.assertNotNull("Preservation method must not be null", specimenFacade.getPreservationMethod());   \r
-                       Assert.assertEquals("Preservation method must be same", preservationMethod, specimenFacade.getPreservationMethod());    \r
+                       Assert.assertNotNull("Preservation method must not be null",\r
+                                       specimenFacade.getPreservationMethod());\r
+                       Assert.assertEquals("Preservation method must be same",\r
+                                       preservationMethod, specimenFacade.getPreservationMethod());\r
                        specimenFacade.setPreservationMethod(null);\r
-                       Assert.assertNull("Preservation method must be null", specimenFacade.getPreservationMethod());\r
+                       Assert.assertNull("Preservation method must be null",\r
+                                       specimenFacade.getPreservationMethod());\r
                } catch (MethodNotSupportedByDerivedUnitTypeException e) {\r
                        Assert.fail("Method not supported should not be thrown for a specimen");\r
                }\r
-               specimenFacade = DerivedUnitFacade.NewInstance(DerivedUnitType.Observation);\r
+               specimenFacade = DerivedUnitFacade\r
+                               .NewInstance(DerivedUnitType.Observation);\r
                try {\r
                        specimenFacade.setPreservationMethod(preservationMethod);\r
                        Assert.fail("Method not supported should be thrown for an observation on set preservation method");\r
-                       \r
+\r
                } catch (MethodNotSupportedByDerivedUnitTypeException e) {\r
-                       //ok\r
+                       // ok\r
                }\r
-               specimenFacade = DerivedUnitFacade.NewInstance(DerivedUnitType.LivingBeing);\r
+               specimenFacade = DerivedUnitFacade\r
+                               .NewInstance(DerivedUnitType.LivingBeing);\r
                try {\r
                        specimenFacade.getPreservationMethod();\r
                        Assert.fail("Method not supported should be thrown for a living being on get preservation method");\r
                } catch (MethodNotSupportedByDerivedUnitTypeException e) {\r
-                       //ok\r
+                       // ok\r
                }\r
-               \r
-               \r
+\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getStoredUnder()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getStoredUnder()}.\r
         */\r
        @Test\r
        public void testGetStoredUnder() {\r
-               Assert.assertNotNull("Stored under name must not be null", specimenFacade.getStoredUnder());    \r
-               Assert.assertEquals("Stored under name must be same", taxonName, specimenFacade.getStoredUnder());      \r
+               Assert.assertNotNull("Stored under name must not be null",\r
+                               specimenFacade.getStoredUnder());\r
+               Assert.assertEquals("Stored under name must be same", taxonName,\r
+                               specimenFacade.getStoredUnder());\r
                specimenFacade.setStoredUnder(null);\r
-               Assert.assertNull("Stored under name must be null", specimenFacade.getStoredUnder());   \r
+               Assert.assertNull("Stored under name must be null",\r
+                               specimenFacade.getStoredUnder());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollectorsNumber()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollectorsNumber()}\r
+        * .\r
         */\r
        @Test\r
        public void testGetSetCollectorsNumber() {\r
-               Assert.assertEquals("Collectors number must be same", collectorsNumber, specimenFacade.getCollectorsNumber());\r
+               Assert.assertEquals("Collectors number must be same", collectorsNumber,\r
+                               specimenFacade.getCollectorsNumber());\r
                specimenFacade.setCollectorsNumber("C12345693");\r
-               Assert.assertEquals("New collectors number must be 'C12345693'", "C12345693", specimenFacade.getCollectorsNumber());\r
+               Assert.assertEquals("New collectors number must be 'C12345693'",\r
+                               "C12345693", specimenFacade.getCollectorsNumber());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getTitleCache()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getTitleCache()}.\r
         */\r
        @Test\r
        public void testGetTitleCache() {\r
-               Assert.assertNotNull("The title cache should never return null if not protected", specimenFacade.getTitleCache());\r
+               Assert.assertNotNull(\r
+                               "The title cache should never return null if not protected",\r
+                               specimenFacade.getTitleCache());\r
                specimenFacade.setTitleCache(null, false);\r
-               Assert.assertNotNull("The title cache should never return null if not protected", specimenFacade.getTitleCache());\r
+               Assert.assertNotNull(\r
+                               "The title cache should never return null if not protected",\r
+                               specimenFacade.getTitleCache());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#setTitleCache(java.lang.String)}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#setTitleCache(java.lang.String)}\r
+        * .\r
         */\r
        @Test\r
        public void testSetTitleCache() {\r
                String testTitle = "Absdwk aksjlf";\r
                specimenFacade.setTitleCache(testTitle, true);\r
-               Assert.assertEquals("Protected title cache should returns the test title", testTitle, specimenFacade.getTitleCache());\r
+               Assert.assertEquals(\r
+                               "Protected title cache should returns the test title",\r
+                               testTitle, specimenFacade.getTitleCache());\r
                specimenFacade.setTitleCache(testTitle, false);\r
-               Assert.assertFalse("Unprotected title cache should not return the test title", testTitle.equals(specimenFacade.getTitleCache()));\r
+               Assert.assertFalse(\r
+                               "Unprotected title cache should not return the test title",\r
+                               testTitle.equals(specimenFacade.getTitleCache()));\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerDerivedUnit()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#innerDerivedUnit()}.\r
         */\r
        @Test\r
        public void testGetSpecimen() {\r
-               Assert.assertEquals("Specimen must be same", specimen, specimenFacade.innerDerivedUnit());      \r
+               Assert.assertEquals("Specimen must be same", specimen,\r
+                               specimenFacade.innerDerivedUnit());\r
        }\r
 \r
        /**\r
-        * Test method for {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollection()}.\r
+        * Test method for\r
+        * {@link eu.etaxonomy.cdm.api.facade.DerivedUnitFacade#getCollection()}.\r
         */\r
        @Test\r
        public void testGetSetCollection() {\r
-               Assert.assertNotNull("Collection must not be null", specimenFacade.getCollection());    \r
-               Assert.assertEquals("Collection must be same", collection, specimenFacade.getCollection());     \r
+               Assert.assertNotNull("Collection must not be null",\r
+                               specimenFacade.getCollection());\r
+               Assert.assertEquals("Collection must be same", collection,\r
+                               specimenFacade.getCollection());\r
                specimenFacade.setCollection(null);\r
-               Assert.assertNull("Collection must be null", specimenFacade.getCollection());   \r
+               Assert.assertNull("Collection must be null",\r
+                               specimenFacade.getCollection());\r
        }\r
-       \r
+\r
        @Test\r
-       public void testAddGetRemoveSource(){\r
-               Assert.assertEquals("No sources should exist yet", 0, specimenFacade.getSources().size());\r
-           Reference reference = ReferenceFactory.newBook();\r
-               IdentifiableSource source1 = specimenFacade.addSource(reference, "54", "myName");\r
-               Assert.assertEquals("One source should exist now", 1, specimenFacade.getSources().size());\r
-               IdentifiableSource source2 = IdentifiableSource.NewInstance("1", "myTable");\r
+       public void testAddGetRemoveSource() {\r
+               Assert.assertEquals("No sources should exist yet", 0, specimenFacade\r
+                               .getSources().size());\r
+               Reference reference = ReferenceFactory.newBook();\r
+               IdentifiableSource source1 = specimenFacade.addSource(reference, "54",\r
+                               "myName");\r
+               Assert.assertEquals("One source should exist now", 1, specimenFacade\r
+                               .getSources().size());\r
+               IdentifiableSource source2 = IdentifiableSource.NewInstance("1",\r
+                               "myTable");\r
                specimenFacade.addSource(source2);\r
-               Assert.assertEquals("One source should exist now", 2, specimenFacade.getSources().size());\r
+               Assert.assertEquals("One source should exist now", 2, specimenFacade\r
+                               .getSources().size());\r
                specimenFacade.removeSource(source1);\r
-               Assert.assertEquals("One source should exist now", 1, specimenFacade.getSources().size());\r
+               Assert.assertEquals("One source should exist now", 1, specimenFacade\r
+                               .getSources().size());\r
                Reference reference2 = ReferenceFactory.newJournal();\r
-               IdentifiableSource sourceNotUsed = specimenFacade.addSource(reference2, null, null);\r
-               specimenFacade.removeSource(sourceNotUsed);     \r
-               Assert.assertEquals("One source should still exist", 1, specimenFacade.getSources().size());\r
-               Assert.assertEquals("1", specimenFacade.getSources().iterator().next().getIdInSource()) ;\r
-               specimenFacade.removeSource(source2);   \r
-               Assert.assertEquals("No sources should exist anymore", 0, specimenFacade.getSources().size());   \r
+               IdentifiableSource sourceNotUsed = specimenFacade.addSource(reference2,\r
+                               null, null);\r
+               specimenFacade.removeSource(sourceNotUsed);\r
+               Assert.assertEquals("One source should still exist", 1, specimenFacade\r
+                               .getSources().size());\r
+               Assert.assertEquals("1", specimenFacade.getSources().iterator().next()\r
+                               .getIdInSource());\r
+               specimenFacade.removeSource(source2);\r
+               Assert.assertEquals("No sources should exist anymore", 0,\r
+                               specimenFacade.getSources().size());\r
        }\r
-       \r
+\r
        @Test\r
-       public void testAddGetRemoveDuplicate(){\r
-               Assert.assertEquals("No duplicates should be available yet", 0, specimenFacade.getDuplicates().size());\r
+       public void testAddGetRemoveDuplicate() {\r
+               Assert.assertEquals("No duplicates should be available yet", 0,\r
+                               specimenFacade.getDuplicates().size());\r
                Specimen newSpecimen1 = Specimen.NewInstance();\r
                specimenFacade.addDuplicate(newSpecimen1);\r
-               Assert.assertEquals("There should be 1 duplicate now", 1, specimenFacade.getDuplicates().size());\r
+               Assert.assertEquals("There should be 1 duplicate now", 1,\r
+                               specimenFacade.getDuplicates().size());\r
                Specimen newSpecimen2 = Specimen.NewInstance();\r
                DerivationEvent newDerivationEvent = DerivationEvent.NewInstance();\r
                newSpecimen2.setDerivedFrom(newDerivationEvent);\r
-               Assert.assertSame("The derivation event should be 'newDerivationEvent'", newDerivationEvent, newSpecimen2.getDerivedFrom());\r
+               Assert.assertSame(\r
+                               "The derivation event should be 'newDerivationEvent'",\r
+                               newDerivationEvent, newSpecimen2.getDerivedFrom());\r
                specimenFacade.addDuplicate(newSpecimen2);\r
-               Assert.assertEquals("There should be 2 duplicates now", 2, specimenFacade.getDuplicates().size());\r
-               Assert.assertNotSame("The derivation event should not be 'newDerivationEvent' anymore", newDerivationEvent, newSpecimen2.getDerivedFrom());\r
-               Assert.assertSame("The derivation event should not be the facades derivation event", derivationEvent, newSpecimen2.getDerivedFrom());\r
+               Assert.assertEquals("There should be 2 duplicates now", 2,\r
+                               specimenFacade.getDuplicates().size());\r
+               Assert.assertNotSame(\r
+                               "The derivation event should not be 'newDerivationEvent' anymore",\r
+                               newDerivationEvent, newSpecimen2.getDerivedFrom());\r
+               Assert.assertSame(\r
+                               "The derivation event should not be the facades derivation event",\r
+                               derivationEvent, newSpecimen2.getDerivedFrom());\r
                specimenFacade.removeDuplicate(newSpecimen1);\r
-               Assert.assertEquals("There should be 1 duplicate now", 1, specimenFacade.getDuplicates().size());\r
-               Assert.assertSame("The only duplicate should be 'newSpecimen2' now", newSpecimen2, specimenFacade.getDuplicates().iterator().next());\r
+               Assert.assertEquals("There should be 1 duplicate now", 1,\r
+                               specimenFacade.getDuplicates().size());\r
+               Assert.assertSame("The only duplicate should be 'newSpecimen2' now",\r
+                               newSpecimen2, specimenFacade.getDuplicates().iterator().next());\r
                specimenFacade.addDuplicate(specimenFacade.innerDerivedUnit());\r
-               Assert.assertEquals("There should be still 1 duplicate because the facade specimen is not a duplicate", 1, specimenFacade.getDuplicates().size());\r
-               \r
+               Assert.assertEquals(\r
+                               "There should be still 1 duplicate because the facade specimen is not a duplicate",\r
+                               1, specimenFacade.getDuplicates().size());\r
+\r
                Collection newCollection = Collection.NewInstance();\r
                String catalogNumber = "1234890";\r
                String accessionNumber = "345345";\r
                String collectorsNumber = "lkjewe";\r
                TaxonNameBase storedUnder = BotanicalName.NewInstance(Rank.SPECIES());\r
                PreservationMethod method = PreservationMethod.NewInstance();\r
-               Specimen duplicateSpecimen = specimenFacade.addDuplicate(newCollection, catalogNumber, accessionNumber, collectorsNumber, storedUnder, method);\r
-               Assert.assertEquals("There should be 2 duplicates now", 2, specimenFacade.getDuplicates().size());\r
+               Specimen duplicateSpecimen = specimenFacade.addDuplicate(newCollection,\r
+                               catalogNumber, accessionNumber, collectorsNumber, storedUnder,\r
+                               method);\r
+               Assert.assertEquals("There should be 2 duplicates now", 2,\r
+                               specimenFacade.getDuplicates().size());\r
                specimenFacade.removeDuplicate(newSpecimen2);\r
-               Assert.assertEquals("There should be 1 duplicates now", 1, specimenFacade.getDuplicates().size());\r
-               Collection sameCollection = specimenFacade.getDuplicates().iterator().next().getCollection();\r
-               Assert.assertSame("Collections should be same", newCollection, sameCollection);\r
+               Assert.assertEquals("There should be 1 duplicates now", 1,\r
+                               specimenFacade.getDuplicates().size());\r
+               Collection sameCollection = specimenFacade.getDuplicates().iterator()\r
+                               .next().getCollection();\r
+               Assert.assertSame("Collections should be same", newCollection,\r
+                               sameCollection);\r
        }\r
-       \r
-// ************************** Existing Specimen with multiple derivation events in line **************/\r
-       \r
+\r
+       // ************************** Existing Specimen with multiple derivation\r
+       // events in line **************/\r
+\r
        @Test\r
-       public void testExistingSpecimen(){\r
+       public void testExistingSpecimen() {\r
                specimenFacade = null;\r
                try {\r
                        specimenFacade = DerivedUnitFacade.NewInstance(collectionSpecimen);\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
                        Assert.fail("Multiple derivation events in line should not throw a not supported exception");\r
                }\r
-               Assert.assertSame("Gathering event should derive from the derivation line", existingGatheringEvent, specimenFacade.innerGatheringEvent());\r
-               Assert.assertEquals("Mediasize should be 0. Only Imagegallery media are supported", 0, specimenFacade.getFieldObjectMedia().size());\r
+               Assert.assertSame(\r
+                               "Gathering event should derive from the derivation line",\r
+                               existingGatheringEvent, specimenFacade.innerGatheringEvent());\r
+               Assert.assertEquals(\r
+                               "Mediasize should be 0. Only Imagegallery media are supported",\r
+                               0, specimenFacade.getFieldObjectMedia().size());\r
        }\r
-       \r
+\r
        @Test\r
-       public void testMultipleFieldObservationsNotSupported(){\r
+       public void testMultipleFieldObservationsNotSupported() {\r
                specimenFacade = null;\r
                FieldObservation secondFieldObject = FieldObservation.NewInstance();\r
                firstDerivationEvent.addOriginal(secondFieldObject);\r
@@ -1106,36 +1500,48 @@ public class DerivedUnitFacadeTest extends CdmTransactionalIntegrationTest {
                        specimenFacade = DerivedUnitFacade.NewInstance(collectionSpecimen);\r
                        Assert.fail("Multiple field observations for one specimen should no be supported by the facade");\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
-                       //ok\r
+                       // ok\r
                }\r
-               Assert.assertNull("Specimen facade should not be initialized", specimenFacade);\r
+               Assert.assertNull("Specimen facade should not be initialized",\r
+                               specimenFacade);\r
        }\r
 \r
        @Test\r
-       public void testOnlyImageGallerySupported(){\r
+       public void testOnlyImageGallerySupported() {\r
                specimenFacade = null;\r
                firstFieldObject.addMedia(media1);\r
                try {\r
                        specimenFacade = DerivedUnitFacade.NewInstance(collectionSpecimen);\r
                        Assert.fail("Only image galleries are supported by the facade but not direct media");\r
                } catch (DerivedUnitFacadeNotSupportedException e) {\r
-                       //ok\r
+                       // ok\r
                }\r
-               Assert.assertNull("Specimen facade should not be initialized", specimenFacade); \r
+               Assert.assertNull("Specimen facade should not be initialized",\r
+                               specimenFacade);\r
        }\r
-       \r
+\r
        @Test\r
-       public void testEventPropagation(){\r
+       public void testEventPropagation() {\r
                specimenFacade.setDistanceToGround(24);\r
-               \r
+\r
        }\r
 \r
-//     @Ignore // set to ignore because I did not want to check knowingly failing tests. Remove @Ignore when this is fixed\r
+       // @Ignore // set to ignore because I did not want to check knowingly\r
+       // failing tests. Remove @Ignore when this is fixed\r
        @Test\r
-       public void testSetBarcode(){\r
+       public void testSetBarcode() {\r
                String barcode = "barcode";\r
                specimenFacade.setBarcode(barcode);\r
-               \r
+\r
                Assert.assertEquals(barcode, specimenFacade.getBarcode());\r
        }\r
+\r
+       @Test\r
+       public void testIsEvenDistance() {\r
+               Integer minimum = 20;\r
+               Integer maximum = 1234;\r
+\r
+               // this should not throw exceptions\r
+               specimenFacade.setAbsoluteElevationRange(minimum, maximum);\r
+       }\r
 }\r