Repository: focus-shift/jollyday (java)

Issue:
Jackson mapping partially incorrect
### More information

When just switching from `jollyday-jaxb` to `jollyday-jackson` in the `pom.xml` ("jaxb" is not mentioned anywhere else) as our project is using `jackson` for everything else, the calendar-related tests and the application startup fail with errors like:
```
java.lang.IllegalStateException: Cannot instantiate configuration from URL 'jar:file://[...]/jollyday-core-0.23.1.jar!/holidays/Holidays_im.xml'.
	at de.focus_shift.jollyday.jackson@0.23.1/de.focus_shift.jollyday.jackson.JacksonConfigurationService.getConfiguration(JacksonConfigurationService.java:21)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.impl.DefaultHolidayManager.doInit(DefaultHolidayManager.java:200)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.HolidayManager.init(HolidayManager.java:253)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:45)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:13)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.caching.Cache.lambda$get$0(Cache.java:27)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.caching.Cache.get(Cache.java:27)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.HolidayManager.createManager(HolidayManager.java:105)
	at de.focus_shift.jollyday.core@0.23.1/de.focus_shift.jollyday.core.HolidayManager.getInstance(HolidayManager.java:89)
[...]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.IllegalStateException: Cannot parse holidays XML file.
	at de.focus_shift.jollyday.jackson@0.23.1/de.focus_shift.jollyday.jackson.XMLUtil.unmarshallConfiguration(XMLUtil.java:33)
	at de.focus_shift.jollyday.jackson@0.23.1/de.focus_shift.jollyday.jackson.JacksonConfigurationService.getConfiguration(JacksonConfigurationService.java:19)
	... 14 more
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "from" (class de.focus_shift.jollyday.jackson.mapping.FixedWeekdayBetweenFixed), not marked as ignorable (8 known properties: "descriptionPropertiesKey", "localizedType", "validFrom", "validTo", "weekday", "From", "To", "every"])
 at [Source: (sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream); line: 64, column: 35] (through reference chain: de.focus_shift.jollyday.jackson.mapping.Configuration["Holidays"]->de.focus_shift.jollyday.jackson.mapping.Holidays["FixedWeekdayBetweenFixed"]->java.util.ArrayList[0]->de.focus_shift.jollyday.jackson.mapping.FixedWeekdayBetweenFixed["from"])
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1153)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2224)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1719)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1697)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:359)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.dataformat.xml@2.16.0/com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:122)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.dataformat.xml@2.16.0/com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext.readRootValue(XmlDeserializationContext.java:104)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4899)
	at com.fasterxml.jackson.databind@2.16.0/com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3883)
	at de.focus_shift.jollyday.jackson@0.23.1/de.focus_shift.jollyday.jackson.XMLUtil.unmarshallConfiguration(XMLUtil.java:31)
	... 15 more

```
After fixing the mappings this still leaves errors like:
```
java.lang.IllegalArgumentException: Configuration for gb contains  multiple SubConfigurations with the same hierarchy id. null 2 times
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.impl.DefaultHolidayManager.validateConfigurationHierarchy(DefaultHolidayManager.java:255)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.impl.DefaultHolidayManager.doInit(DefaultHolidayManager.java:201)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.HolidayManager.init(HolidayManager.java:253)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:45)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:13)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.caching.Cache.lambda$get$0(Cache.java:27)
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.caching.Cache.get(Cache.java:27)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.HolidayManager.createManager(HolidayManager.java:105)
	at de.focus_shift.jollyday.core@0.24.0-SNAPSHOT/de.focus_shift.jollyday.core.HolidayManager.getInstance(HolidayManager.java:89)
[...]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
``` 

Pull request:
424 jackson mapping
closes #424 

Patch:
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java
index 82e5cc65..6a5557f5 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/JacksonIslamicHoliday.java
@@ -7,9 +7,10 @@ import de.focus_shift.jollyday.core.spi.MovingCondition;
 import de.focus_shift.jollyday.core.spi.YearCycle;
 
 import java.time.Year;
-import java.util.Collections;
 import java.util.List;
 
+import static java.util.stream.Collectors.toList;
+
 
 public class JacksonIslamicHoliday implements IslamicHoliday {
 
@@ -59,6 +60,8 @@ public class JacksonIslamicHoliday implements IslamicHoliday {
 
   @Override
   public List<MovingCondition> conditions() {
-    return Collections.emptyList();
+    return islamicHoliday.getMovingCondition().stream()
+      .map(JacksonMovingCondition::new)
+      .collect(toList());
   }
 }
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Configuration.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Configuration.java
index 3aea9011..514a0d09 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Configuration.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Configuration.java
@@ -1,6 +1,7 @@
 package de.focus_shift.jollyday.jackson.mapping;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 
 import java.util.ArrayList;
@@ -9,8 +10,13 @@ import java.util.List;
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class Configuration {
 
+  @JacksonXmlElementWrapper(localName = "Holidays", useWrapping = false)
   protected Holidays holidays;
+  @JacksonXmlElementWrapper(localName = "Sources", useWrapping = false)
+  protected Sources sources;
+  @JacksonXmlElementWrapper(localName = "SubConfigurations", useWrapping = false)
   protected List<Configuration> subConfigurations;
+
   @JacksonXmlProperty(localName = "hierarchy", isAttribute = true)
   protected String hierarchy;
   @JacksonXmlProperty(localName = "description", isAttribute = true)
@@ -36,6 +42,26 @@ public class Configuration {
     this.holidays = value;
   }
 
+  /**
+   * Gets the value of the sources' property.
+   *
+   * @return possible object is
+   * {@link Sources }
+   */
+  public Sources getSources() {
+    return this.sources;
+  }
+
+  /**
+   * Sets the value of the sources property.
+   *
+   * @param sources allowed object is
+   *              {@link Sources }
+   */
+  public void setSources(Sources sources) {
+    this.sources = sources;
+  }
+
   /**
    * Gets the value of the subConfigurations property.
    *
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayBetweenFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayBetweenFixed.java
index 673b4fe7..55f46e65 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayBetweenFixed.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayBetweenFixed.java
@@ -4,10 +4,10 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 
 public class FixedWeekdayBetweenFixed extends Holiday {
 
-
+  @JacksonXmlProperty(localName = "from")
   protected Fixed from;
+  @JacksonXmlProperty(localName = "to")
   protected Fixed to;
-
   @JacksonXmlProperty(localName = "weekday", isAttribute = true)
   protected Weekday weekday;
 
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayRelativeToFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayRelativeToFixed.java
index 4e404c2e..9438cb2e 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayRelativeToFixed.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/FixedWeekdayRelativeToFixed.java
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 
 public class FixedWeekdayRelativeToFixed extends Holiday {
 
+  @JacksonXmlProperty(localName = "day")
   protected Fixed day;
   @JacksonXmlProperty(localName = "which", isAttribute = true)
   protected Which which;
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/IslamicHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/IslamicHoliday.java
index c32a56f2..f1a804a1 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/IslamicHoliday.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/IslamicHoliday.java
@@ -2,7 +2,7 @@ package de.focus_shift.jollyday.jackson.mapping;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 
-public class IslamicHoliday extends Holiday {
+public class IslamicHoliday extends MoveableHoliday {
 
   @JacksonXmlProperty(localName = "type", isAttribute = true)
   protected IslamicHolidayType type;
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/MoveableHoliday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/MoveableHoliday.java
index 71cde39d..708c759a 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/MoveableHoliday.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/MoveableHoliday.java
@@ -1,10 +1,13 @@
 package de.focus_shift.jollyday.jackson.mapping;
 
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+
 import java.util.ArrayList;
 import java.util.List;
 
 public abstract class MoveableHoliday extends Holiday {
 
+  @JacksonXmlElementWrapper(localName = "MovingCondition", useWrapping = false)
   protected List<MovingCondition> movingCondition;
 
   /**
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToEasterSunday.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToEasterSunday.java
index 81589ca4..f24507ec 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToEasterSunday.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToEasterSunday.java
@@ -1,8 +1,12 @@
 package de.focus_shift.jollyday.jackson.mapping;
 
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+
 public class RelativeToEasterSunday extends Holiday {
 
+  @JacksonXmlProperty(localName = "chronology", isAttribute = true)
   protected ChronologyType chronology;
+  @JacksonXmlProperty(localName = "days", isAttribute = true)
   protected int days;
 
   /**
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToFixed.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToFixed.java
index f1e14349..f96e7deb 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToFixed.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToFixed.java
@@ -1,10 +1,16 @@
 package de.focus_shift.jollyday.jackson.mapping;
 
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+
 public class RelativeToFixed extends Holiday {
 
+  @JacksonXmlElementWrapper(localName = "Days", useWrapping = false)
   protected Integer days;
+  @JacksonXmlElementWrapper(localName = "Weekday", useWrapping = false)
   protected Weekday weekday;
+  @JacksonXmlElementWrapper(localName = "When", useWrapping = false)
   protected When when;
+  @JacksonXmlElementWrapper(localName = "Date", useWrapping = false)
   protected Fixed date;
 
   /**
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToWeekdayInMonth.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToWeekdayInMonth.java
index 35733f36..14da82a2 100644
--- a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToWeekdayInMonth.java
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/RelativeToWeekdayInMonth.java
@@ -1,9 +1,11 @@
 package de.focus_shift.jollyday.jackson.mapping;
 
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 
 public class RelativeToWeekdayInMonth extends Holiday {
 
+  @JacksonXmlElementWrapper(localName = "FixedWeekdayInMonth", useWrapping = false)
   protected FixedWeekdayInMonth fixedWeekday;
   @JacksonXmlProperty(localName = "weekday", isAttribute = true)
   protected Weekday weekday;
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Source.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Source.java
new file mode 100644
index 00000000..b69f0313
--- /dev/null
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Source.java
@@ -0,0 +1,69 @@
+package de.focus_shift.jollyday.jackson.mapping;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
+
+
+/**
+ * <p>Java class for Source complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="Source"&gt;
+ *   &lt;simpleContent&gt;
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;string"&gt;
+ *       &lt;attribute name="of" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
+ *     &lt;/extension&gt;
+ *   &lt;/simpleContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ */
+public class Source {
+
+  @JacksonXmlText
+  protected String value;
+  @JacksonXmlProperty(localName = "of", isAttribute = true)
+  protected String of;
+
+  /**
+   * Gets the value of the value property.
+   *
+   * @return possible object is
+   * {@link String }
+   */
+  public String getValue() {
+    return value;
+  }
+
+  /**
+   * Sets the value of the value property.
+   *
+   * @param value allowed object is
+   *              {@link String }
+   */
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  /**
+   * Gets the value of the of property.
+   *
+   * @return possible object is
+   * {@link String }
+   */
+  public String getOf() {
+    return of;
+  }
+
+  /**
+   * Sets the value of the of property.
+   *
+   * @param value allowed object is
+   *              {@link String }
+   */
+  public void setOf(String value) {
+    this.of = value;
+  }
+
+}
diff --git a/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Sources.java b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Sources.java
new file mode 100644
index 00000000..cdd9ba4d
--- /dev/null
+++ b/jollyday-jackson/src/main/java/de/focus_shift/jollyday/jackson/mapping/Sources.java
@@ -0,0 +1,58 @@
+package de.focus_shift.jollyday.jackson.mapping;
+
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <p>Java class for Sources complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="Sources"&gt;
+ *   &lt;complexContent&gt;
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ *       &lt;sequence&gt;
+ *         &lt;element name="Source" type="{https://focus_shift.de/jollyday/schema/holiday}Source" maxOccurs="unbounded" minOccurs="0"/&gt;
+ *       &lt;/sequence&gt;
+ *     &lt;/restriction&gt;
+ *   &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ */
+public class Sources {
+
+  @JacksonXmlElementWrapper(localName = "Source", useWrapping = false)
+  protected List<Source> source;
+
+  /**
+   * Gets the value of the source property.
+   *
+   * <p>
+   * This accessor method returns a reference to the live list,
+   * not a snapshot. Therefore any modification you make to the
+   * returned list will be present inside the Jakarta XML Binding object.
+   * This is why there is not a <CODE>set</CODE> method for the source property.
+   *
+   * <p>
+   * For example, to add a new item, do as follows:
+   * <pre>
+   *    getSource().add(newItem);
+   * </pre>
+   *
+   *
+   * <p>
+   * Objects of the following type(s) are allowed in the list
+   * {@link Source }
+   */
+  public List<Source> getSource() {
+    if (source == null) {
+      source = new ArrayList<Source>();
+    }
+    return this.source;
+  }
+
+}


Test patch:
diff --git a/jollyday-tests/pom.xml b/jollyday-tests/pom.xml
index 0329a34d..6234bb45 100644
--- a/jollyday-tests/pom.xml
+++ b/jollyday-tests/pom.xml
@@ -20,7 +20,7 @@
     </dependency>
     <dependency>
       <groupId>de.focus-shift</groupId>
-      <artifactId>jollyday-jaxb</artifactId>
+      <artifactId>jollyday-jackson</artifactId>
       <version>${project.version}</version>
     </dependency>