Эх сурвалжийг харах

GatherDivorceCertificate Data

Andrew Grant 1 сар өмнө
parent
commit
00ff0f4885
16 өөрчлөгдсөн 303 нэмэгдсэн , 32 устгасан
  1. 1 0
      src/main/java/scot/carricksoftware/grantswriter/BaseEntity.java
  2. 30 21
      src/main/java/scot/carricksoftware/grantswriter/domains/certificates/marriagecertificate/MarriageCertificate.java
  3. 0 2
      src/main/java/scot/carricksoftware/grantswriter/domains/people/Person.java
  4. 0 3
      src/main/java/scot/carricksoftware/grantswriter/domains/places/Organisation.java
  5. 0 3
      src/main/java/scot/carricksoftware/grantswriter/domains/places/Place.java
  6. 1 1
      src/main/java/scot/carricksoftware/grantswriter/domains/places/Region.java
  7. 12 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherDivorceCertificateTimeLineData.java
  8. 61 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherDivorceCertificateTimeLineDataImpl.java
  9. 6 1
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherTimeLineDataImpl.java
  10. 15 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateFirstPartyTimeLineData.java
  11. 55 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateFirstPartyTimeLineDataImpl.java
  12. 15 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateSecondPartyTimeLineData.java
  13. 52 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateSecondPartyTimeLineDataImpl.java
  14. 16 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/helpers/AddDivorceDetails.java
  15. 38 0
      src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/helpers/AddDivorceDetailsImpl.java
  16. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/marriagecertificate/helpers/AddDivorceDetailsTest.java

+ 1 - 0
src/main/java/scot/carricksoftware/grantswriter/BaseEntity.java

@@ -24,4 +24,5 @@ public class BaseEntity {
     public Long getId() {
         return id;
     }
+
 }

+ 30 - 21
src/main/java/scot/carricksoftware/grantswriter/domains/certificates/marriagecertificate/MarriageCertificate.java

@@ -104,87 +104,66 @@ public class MarriageCertificate extends BaseCertificate {
         this.groom = groom;
     }
 
-    @SuppressWarnings("unused")
     public String getWhenMarried() {
         return whenMarried;
     }
 
-
-
-    @SuppressWarnings("unused")
     public Place getWhereMarried() {
         return whereMarried;
     }
 
-    @SuppressWarnings("unused")
     public void setWhereMarried(Place whereMarried) {
         this.whereMarried = whereMarried;
     }
 
-    @SuppressWarnings("unused")
     public String getUntrackedWhereMarried() {
         return untrackedWhereMarried;
     }
 
-    @SuppressWarnings("unused")
     public void setUntrackedWhereMarried(String untrackedWhereMarried) {
         this.untrackedWhereMarried = untrackedWhereMarried;
     }
 
-
-
-    @SuppressWarnings("unused")
     public Place getBrideUsualResidence() {
         return brideUsualResidence;
     }
 
-    @SuppressWarnings("unused")
     public void setBrideUsualResidence(Place brideUsualResidence) {
         this.brideUsualResidence = brideUsualResidence;
     }
 
-    @SuppressWarnings("unused")
     public String getGroomUntrackedResidence() {
         return groomUntrackedResidence;
     }
 
-    @SuppressWarnings("unused")
     public void setGroomUntrackedResidence(String groomUntrackedResidence) {
         this.groomUntrackedResidence = groomUntrackedResidence;
     }
 
-    @SuppressWarnings("unused")
     public String getBrideUntrackedResidence() {
         return brideUntrackedResidence;
     }
 
-    @SuppressWarnings("unused")
     public void setBrideUntrackedResidence(String brideUntrackedResidence) {
         this.brideUntrackedResidence = brideUntrackedResidence;
     }
 
-
-    @SuppressWarnings("unused")
     public Person getFirstWitness() {
         return firstWitness;
     }
 
-    @SuppressWarnings("unused")
     public void setFirstWitness(Person firstWitness) {
         this.firstWitness = firstWitness;
     }
 
-    @SuppressWarnings("unused")
     public Person getSecondWitness() {
         return secondWitness;
     }
 
-    @SuppressWarnings("unused")
     public void setSecondWitness(Person secondWitness) {
         this.secondWitness = secondWitness;
     }
 
-
     public void setWhenMarried(String whenMarried) {
         this.whenMarried = whenMarried;
     }
@@ -204,4 +183,34 @@ public class MarriageCertificate extends BaseCertificate {
     public void setBrideRank(String brideRank) {
         this.brideRank = brideRank;
     }
+
+    @SuppressWarnings("unused")
+    public Place getGroomUsualResidence() {
+        return groomUsualResidence;
+    }
+
+    @SuppressWarnings("unused")
+    public void setGroomUsualResidence(Place groomUsualResidence) {
+        this.groomUsualResidence = groomUsualResidence;
+    }
+
+    @SuppressWarnings("unused")
+    public String getUntrackedFirstWitness() {
+        return untrackedFirstWitness;
+    }
+
+    @SuppressWarnings("unused")
+    public void setUntrackedFirstWitness(String untrackedFirstWitness) {
+        this.untrackedFirstWitness = untrackedFirstWitness;
+    }
+
+    @SuppressWarnings("unused")
+    public String getUntrackedSecondWitness() {
+        return untrackedSecondWitness;
+    }
+
+    @SuppressWarnings("unused")
+    public void setUntrackedSecondWitness(String untrackedSecondWitness) {
+        this.untrackedSecondWitness = untrackedSecondWitness;
+    }
 }

+ 0 - 2
src/main/java/scot/carricksoftware/grantswriter/domains/people/Person.java

@@ -88,12 +88,10 @@ public class Person extends BaseEntity {
         return builder.toString();
     }
 
-    @SuppressWarnings("unused")
     public String getCertifiedYearOfDeath() {
         return certifiedYearOfDeath;
     }
 
-    @SuppressWarnings("unused")
     public void setCertifiedYearOfDeath(String certifiedYearOfDeath) {
         this.certifiedYearOfDeath = certifiedYearOfDeath;
     }

+ 0 - 3
src/main/java/scot/carricksoftware/grantswriter/domains/places/Organisation.java

@@ -16,17 +16,14 @@ public class Organisation extends BaseEntity {
     @Column(name = "`name`")
     private String name;
 
-    @SuppressWarnings("unused")
     public String getName() {
         return name;
     }
 
-    @SuppressWarnings("unused")
     public void setName(String name) {
         this.name = name;
     }
 
-    @Override
     public String toString() {
         return name;
     }

+ 0 - 3
src/main/java/scot/carricksoftware/grantswriter/domains/places/Place.java

@@ -19,7 +19,6 @@ public class Place extends BaseEntity {
     @JoinColumn(name = "`region_id`")
     private Region region;
 
-    @SuppressWarnings("unused")
     public String getName() {
         return name;
     }
@@ -28,7 +27,6 @@ public class Place extends BaseEntity {
         this.name = name;
     }
 
-    @SuppressWarnings("unused")
     public Region getRegion() {
         return region;
     }
@@ -37,7 +35,6 @@ public class Place extends BaseEntity {
         this.region = region;
     }
 
-    @Override
     public String toString() {
         return name +
                 ", " + region.getName() +

+ 1 - 1
src/main/java/scot/carricksoftware/grantswriter/domains/places/Region.java

@@ -19,7 +19,7 @@ public class Region extends BaseEntity {
     @JoinColumn(name = "`country_id`")
     private Country country;
 
-    @SuppressWarnings("unused")
+
     public String getName() {
         return name;
     }

+ 12 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherDivorceCertificateTimeLineData.java

@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers;
+
+import scot.carricksoftware.grantswriter.domains.people.Person;
+
+public interface GatherDivorceCertificateTimeLineData {
+   void gather(@SuppressWarnings("unused") Person person);
+}

+ 61 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherDivorceCertificateTimeLineDataImpl.java

@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Component;
+import scot.carricksoftware.grantswriter.domains.people.Person;
+import scot.carricksoftware.grantswriter.services.certificates.divorcecertificate.DivorceCertificateService;
+import scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.GatherDivorceCertificateFirstPartyTimeLineData;
+import scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.GatherDivorceCertificateSecondPartyTimeLineData;
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+
+
+import java.util.List;
+
+
+@Component
+public class GatherDivorceCertificateTimeLineDataImpl implements GatherDivorceCertificateTimeLineData {
+    private static final Logger logger = LogManager.getLogger(GatherDivorceCertificateTimeLineDataImpl.class);
+
+    private final DivorceCertificateService divorceCertificateService;
+
+    private final GatherDivorceCertificateFirstPartyTimeLineData gatherDivorceCertificateFirstPartyTimeLineData;
+    private final GatherDivorceCertificateSecondPartyTimeLineData gatherDivorceCertificateSecondPartyTimeLineData;
+
+    public GatherDivorceCertificateTimeLineDataImpl(DivorceCertificateService divorceCertificateService,
+                                                    GatherDivorceCertificateFirstPartyTimeLineData gatherDivorceCertificateFirstPartyTimeLineData,
+                                                    GatherDivorceCertificateSecondPartyTimeLineData gatherDivorceCertificateSecondPartyTimeLineData) {
+        this.divorceCertificateService = divorceCertificateService;
+        this.gatherDivorceCertificateFirstPartyTimeLineData = gatherDivorceCertificateFirstPartyTimeLineData;
+        this.gatherDivorceCertificateSecondPartyTimeLineData = gatherDivorceCertificateSecondPartyTimeLineData;
+    }
+
+    @Override
+    public void gather(Person person) {
+        logger.debug("GatherDivorceCertificateTimeLineDataImpl::gather");
+        gatherFirstParty(person);
+        gatherSecondParty(person);
+    }
+
+    private void gatherFirstParty(Person person) {
+        logger.debug("GatherDivorceCertificateTimeLineDataImpl::gatherParty");
+        List<DivorceCertificate> divorceCertificates = divorceCertificateService.findAllByFirstParty(person);
+        if (!divorceCertificates.isEmpty()) {
+            gatherDivorceCertificateFirstPartyTimeLineData.gather(divorceCertificates);
+        }
+    }
+
+    private void gatherSecondParty(Person person) {
+        logger.debug("GatherDivorceCertificateTimeLineDataImpl::gatherSecondParty");
+        List<DivorceCertificate> divorceCertificates = divorceCertificateService.findAllBySecondParty(person);
+        if (!divorceCertificates.isEmpty()) {
+            gatherDivorceCertificateSecondPartyTimeLineData.gather(divorceCertificates);
+        }
+    }
+
+}

+ 6 - 1
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherTimeLineDataImpl.java

@@ -5,6 +5,7 @@
 
 package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers;
 
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import scot.carricksoftware.grantswriter.domains.people.Person;
 
@@ -15,13 +16,16 @@ public class GatherTimeLineDataImpl implements GatherTimeLineData {
     private final GatherBirthCertificateTimeLineData gatherBirthCertificateTimeLineData;
     private final GatherDeathCertificateTimeLineData gatherDeathCertificateTimeLineData;
     private final GatherMarriageCertificateTimeLineData gatherMarriageCertificateTimeLineData;
+    private final GatherDivorceCertificateTimeLineData gatherDivorceCertificateTimeLineData;
 
+    @Autowired
     public GatherTimeLineDataImpl(
-            GatherCensusTimeLineData gatherCensusTimeLineData, GatherBirthCertificateTimeLineData gatherBirthCertificateTimeLineData, GatherDeathCertificateTimeLineData gatherDeathCertificateTimeLineData, GatherMarriageCertificateTimeLineData gatherMarriageCertificateTimeLineData) {
+            GatherCensusTimeLineData gatherCensusTimeLineData, GatherBirthCertificateTimeLineData gatherBirthCertificateTimeLineData, GatherDeathCertificateTimeLineData gatherDeathCertificateTimeLineData, GatherMarriageCertificateTimeLineData gatherMarriageCertificateTimeLineData, GatherDivorceCertificateTimeLineData gatherDivorceCertificateTimeLineData) {
         this.gatherCensusTimeLineData = gatherCensusTimeLineData;
         this.gatherBirthCertificateTimeLineData = gatherBirthCertificateTimeLineData;
         this.gatherDeathCertificateTimeLineData = gatherDeathCertificateTimeLineData;
         this.gatherMarriageCertificateTimeLineData = gatherMarriageCertificateTimeLineData;
+        this.gatherDivorceCertificateTimeLineData = gatherDivorceCertificateTimeLineData;
     }
 
     @Override
@@ -30,5 +34,6 @@ public class GatherTimeLineDataImpl implements GatherTimeLineData {
         gatherBirthCertificateTimeLineData.gather(person);
         gatherDeathCertificateTimeLineData.gather(person);
         gatherMarriageCertificateTimeLineData.gather(person);
+        gatherDivorceCertificateTimeLineData.gather(person);
     }
 }

+ 15 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateFirstPartyTimeLineData.java

@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate;
+
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+
+import java.util.List;
+
+public interface GatherDivorceCertificateFirstPartyTimeLineData {
+   @SuppressWarnings("unused")
+   void gather(List<DivorceCertificate> divorceCertificates);
+}

+ 55 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateFirstPartyTimeLineDataImpl.java

@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Component;
+import scot.carricksoftware.grantswriter.data.DMY;
+import scot.carricksoftware.grantswriter.data.TimeLineData;
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+import scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.helpers.AddDivorceDetails;
+
+
+import java.util.List;
+import java.util.TreeMap;
+
+@Component
+public class GatherDivorceCertificateFirstPartyTimeLineDataImpl implements GatherDivorceCertificateFirstPartyTimeLineData {
+
+    private final TimeLineData timelineData;
+
+    private static final Logger logger = LogManager.getLogger(GatherDivorceCertificateFirstPartyTimeLineDataImpl.class);
+
+    private final AddDivorceDetails addDivorceDetails;
+
+    public GatherDivorceCertificateFirstPartyTimeLineDataImpl(TimeLineData timelineData, AddDivorceDetails addDivorceDetails) {
+        this.timelineData = timelineData;
+        this.addDivorceDetails = addDivorceDetails;
+    }
+
+
+    @Override
+    public void gather(List<DivorceCertificate> divorceCertificates) {
+        logger.info("GatherMarriageCertificateFirstWitnessTimeLineDataImpl::Gather");
+        for (DivorceCertificate divorceCertificate : divorceCertificates) {
+            addDivorced(timelineData.getTimeLine(), divorceCertificate);
+            addRefs(divorceCertificate);
+        }
+    }
+
+    @SuppressWarnings("unused")
+    private void addRefs(DivorceCertificate divorceCertificate) {
+        timelineData.getRefs().add("Divorce Certificate for : " + divorceCertificate.getFirstParty() + " and " + divorceCertificate.getSecondParty());
+    }
+
+    private void addDivorced(TreeMap<DMY, List<String>> timeLine, DivorceCertificate divorceCertificate) {
+        logger.info("GatherDivorceCertificateFirstPartyTimeLineDataImpl::AddDivorce");
+        addDivorceDetails.addDivorceDetails(timeLine, divorceCertificate);
+
+    }
+
+}

+ 15 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateSecondPartyTimeLineData.java

@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate;
+
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+
+import java.util.List;
+
+public interface GatherDivorceCertificateSecondPartyTimeLineData {
+   @SuppressWarnings("unused")
+   void gather(List<DivorceCertificate> divorceCertificates);
+}

+ 52 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/GatherDivorceCertificateSecondPartyTimeLineDataImpl.java

@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.stereotype.Component;
+import scot.carricksoftware.grantswriter.data.DMY;
+import scot.carricksoftware.grantswriter.data.TimeLineData;
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+import scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.helpers.AddDivorceDetails;
+
+import java.util.List;
+import java.util.TreeMap;
+
+@Component
+public class GatherDivorceCertificateSecondPartyTimeLineDataImpl implements GatherDivorceCertificateSecondPartyTimeLineData {
+
+    private final TimeLineData timelineData;
+
+    private static final Logger logger = LogManager.getLogger(GatherDivorceCertificateSecondPartyTimeLineDataImpl.class);
+
+    private final AddDivorceDetails addDivorceDetails;
+
+    public GatherDivorceCertificateSecondPartyTimeLineDataImpl(TimeLineData timelineData, AddDivorceDetails addDivorceDetails) {
+        this.timelineData = timelineData;
+        this.addDivorceDetails = addDivorceDetails;
+    }
+
+    @Override
+    public void gather(List<DivorceCertificate> divorceCertificates) {
+        logger.info("GatherMarriageCertificateFirstWitnessTimeLineDataImpl::Gather");
+        for (DivorceCertificate divorceCertificate : divorceCertificates) {
+            addDivorced(timelineData.getTimeLine(), divorceCertificate);
+            addRefs(divorceCertificate);
+        }
+    }
+
+    @SuppressWarnings("unused")
+    private void addRefs(DivorceCertificate divorceCertificate) {
+        timelineData.getRefs().add("Divorce Certificate for : " + divorceCertificate.getFirstParty() + " and " + divorceCertificate.getSecondParty());
+    }
+
+    private void addDivorced(TreeMap<DMY, List<String>> timeLine, DivorceCertificate divorceCertificate) {
+        logger.info("GatherDivorceCertificateFirstPartyTimeLineDataImpl::AddDivorce");
+        addDivorceDetails.addDivorceDetails(timeLine, divorceCertificate);
+
+    }
+}

+ 16 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/helpers/AddDivorceDetails.java

@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.helpers;
+
+import scot.carricksoftware.grantswriter.data.DMY;
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+
+import java.util.List;
+import java.util.TreeMap;
+
+public interface AddDivorceDetails {
+    void addDivorceDetails(TreeMap<DMY, List<String>> timeLine, DivorceCertificate divorceCertificate);
+}

+ 38 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/divorcecertificate/helpers/AddDivorceDetailsImpl.java

@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.helpers.level2.divorcecertificate.helpers;
+
+import org.springframework.stereotype.Component;
+import scot.carricksoftware.grantswriter.converters.StringToDMYConverter;
+import scot.carricksoftware.grantswriter.data.DMY;
+import scot.carricksoftware.grantswriter.domains.certificates.divorcecertificate.DivorceCertificate;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TreeMap;
+
+@Component
+public class AddDivorceDetailsImpl implements AddDivorceDetails {
+
+    private final StringToDMYConverter stringToDMYConverter;
+
+    public AddDivorceDetailsImpl(StringToDMYConverter stringToDMYConverter) {
+        this.stringToDMYConverter = stringToDMYConverter;
+    }
+
+    @Override
+    public void addDivorceDetails(TreeMap<DMY, List<String>> timeLine, DivorceCertificate divorceCertificate) {
+        List<String> existingValues = timeLine.get(stringToDMYConverter.convert(divorceCertificate.getRegisteredDate()));
+        if (existingValues == null) {
+            existingValues = new ArrayList<>();
+        }
+
+        existingValues.add("Witnessed the marriage of " + divorceCertificate.getFirstParty().toString() + " and " + divorceCertificate.getSecondParty().toString());
+
+        timeLine.put(stringToDMYConverter.convert(divorceCertificate.getRegisteredDate()), existingValues);
+    }
+
+}

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/marriagecertificate/helpers/AddWitnessDetailsTest.java → src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/marriagecertificate/helpers/AddDivorceDetailsTest.java

@@ -24,7 +24,7 @@ import static org.mockito.Mockito.when;
 import static scot.carricksoftware.grantswriter.GenerateRandomPeopleValues.GetRandomPerson;
 
 @ExtendWith(MockitoExtension.class)
-public class AddWitnessDetailsTest {
+public class AddDivorceDetailsTest {
 
     private AddWitnessDetails addWitnessDetails;