diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java index aa23c04e3..22b7286f5 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java @@ -50,12 +50,12 @@ public void aggregate(final OffenceDecision offenceDecision, setFinalOffence(decisionAggregate, offenceId, judicialResults); - // conviction information - a dismissal carries the FOUND_NOT_GUILTY verdict but has no - // conviction date or convicting court + // conviction information - a dismissal carries the FOUND_NOT_GUILTY verdict dated on the + // resulting date but has no convicting court decisionAggregate.putConvictionInfo(offenceId, new ConvictionInfo(offenceId, dismissOffenceDecision.getOffenceDecisionInformation().getVerdict(), - dismissOffenceDecision.getConvictionDate(), + resultedOn.toLocalDate(), null)); } diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java index f9d5c9b22..b028eed2a 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java @@ -62,7 +62,7 @@ public void shouldPopulateConvictionInfoWithFoundNotGuiltyVerdict() { assertThat(convictionInfo, is(Matchers.notNullValue())); assertThat(convictionInfo.getOffenceId(), Matchers.is(offence1Id)); assertThat(convictionInfo.getVerdictType(), Matchers.is(FOUND_NOT_GUILTY)); - assertThat(convictionInfo.getConvictionDate(), is(nullValue())); + assertThat(convictionInfo.getConvictionDate(), is(resultedOn.toLocalDate())); assertThat(convictionInfo.getConvictingCourt(), is(nullValue())); } }