diff --git a/_infra/helm/case/Chart.yaml b/_infra/helm/case/Chart.yaml index 674c5d205..c8f8c67dd 100644 --- a/_infra/helm/case/Chart.yaml +++ b/_infra/helm/case/Chart.yaml @@ -14,8 +14,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 12.0.23 +version: 12.0.24 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 12.0.23 +appVersion: 12.0.24 diff --git a/pom.xml b/pom.xml index 654803968..738415494 100644 --- a/pom.xml +++ b/pom.xml @@ -333,6 +333,7 @@ exec-maven-plugin org.codehaus.mojo + 3.4.1 pre-stop @@ -382,6 +383,13 @@ org.apache.maven.plugins maven-surefire-plugin ${surefire.version} + + + org.apache.maven.surefire + surefire-junit47 + 3.2.5 + + org.apache.maven.plugins diff --git a/src/main/java/uk/gov/ons/ctp/response/casesvc/message/sampleunitnotification/SampleUnitParent.java b/src/main/java/uk/gov/ons/ctp/response/casesvc/message/sampleunitnotification/SampleUnitParent.java index 8745dd256..331ad403e 100644 --- a/src/main/java/uk/gov/ons/ctp/response/casesvc/message/sampleunitnotification/SampleUnitParent.java +++ b/src/main/java/uk/gov/ons/ctp/response/casesvc/message/sampleunitnotification/SampleUnitParent.java @@ -1,12 +1,10 @@ package uk.gov.ons.ctp.response.casesvc.message.sampleunitnotification; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; import lombok.experimental.SuperBuilder; @Data +@EqualsAndHashCode(callSuper = true) @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PUBLIC) @SuperBuilder diff --git a/src/main/java/uk/gov/ons/ctp/response/lib/common/rest/RestUtilityConfig.java b/src/main/java/uk/gov/ons/ctp/response/lib/common/rest/RestUtilityConfig.java index ea441408a..1deea3b50 100644 --- a/src/main/java/uk/gov/ons/ctp/response/lib/common/rest/RestUtilityConfig.java +++ b/src/main/java/uk/gov/ons/ctp/response/lib/common/rest/RestUtilityConfig.java @@ -11,9 +11,9 @@ @AllArgsConstructor @NoArgsConstructor public class RestUtilityConfig { - private String scheme = "http"; - private String host = "localhost"; - private String port = "8080"; + @Builder.Default private String scheme = "http"; + @Builder.Default private String host = "localhost"; + @Builder.Default private String port = "8080"; private String username; private String password; } diff --git a/src/test/java/uk/gov/ons/ctp/response/casesvc/service/CaseCreationServiceTest.java b/src/test/java/uk/gov/ons/ctp/response/casesvc/service/CaseCreationServiceTest.java index 3b00287bf..82c56c365 100644 --- a/src/test/java/uk/gov/ons/ctp/response/casesvc/service/CaseCreationServiceTest.java +++ b/src/test/java/uk/gov/ons/ctp/response/casesvc/service/CaseCreationServiceTest.java @@ -96,7 +96,8 @@ public void testCreateCaseAndCaseGroupWithoutChildFromMessage() throws Exception Case capturedCase = caze.getValue(); assertEquals(UUID.class, capturedCase.getId().getClass()); - assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), capturedCase.getCaseGroupFK()); + assertEquals( + Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), capturedCase.getCaseGroupFK()); assertEquals(capturedCaseGroup.getId(), capturedCase.getCaseGroupId()); assertEquals(CaseState.ACTIONABLE, capturedCase.getState()); assertEquals( @@ -170,7 +171,7 @@ public void testCreateCaseAndCaseGroupWithChildFromMessage() throws Exception { Case childCase = capturedCases.get(0); assertEquals(UUID.class, childCase.getId().getClass()); - assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), childCase.getCaseGroupFK()); + assertEquals(Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), childCase.getCaseGroupFK()); assertEquals(capturedCaseGroup.getId(), childCase.getCaseGroupId()); assertEquals(CaseState.ACTIONABLE, childCase.getState()); assertEquals( @@ -184,7 +185,7 @@ public void testCreateCaseAndCaseGroupWithChildFromMessage() throws Exception { Case parentCase = capturedCases.get(2); assertEquals(UUID.class, parentCase.getId().getClass()); - assertEquals(new Integer(capturedCaseGroup.getCaseGroupPK()), parentCase.getCaseGroupFK()); + assertEquals(Integer.valueOf(capturedCaseGroup.getCaseGroupPK()), parentCase.getCaseGroupFK()); assertEquals(capturedCaseGroup.getId(), parentCase.getCaseGroupId()); assertEquals(CaseState.INACTIONABLE, parentCase.getState()); assertEquals( diff --git a/src/test/java/uk/gov/ons/ctp/response/casesvc/state/StateTransitionManagerUnitTest.java b/src/test/java/uk/gov/ons/ctp/response/casesvc/state/StateTransitionManagerUnitTest.java index 2c1f9a378..ad43fed63 100644 --- a/src/test/java/uk/gov/ons/ctp/response/casesvc/state/StateTransitionManagerUnitTest.java +++ b/src/test/java/uk/gov/ons/ctp/response/casesvc/state/StateTransitionManagerUnitTest.java @@ -584,14 +584,14 @@ public void givenUnknownEligibilityWhenEqLaunchThenComplete() throws CTPExceptio @Test public void testCaseGroupTransitionFromCompleteToNotStarted() throws CTPException { // Given - CaseGroupStatus notStarted = CaseGroupStatus.NOTSTARTED; + CaseGroupStatus caseGroupStatus = CaseGroupStatus.COMPLETE; // When CaseGroupStatus destinationState = caseGroupStateMachine.transition( - notStarted, CategoryDTO.CategoryName.OFFLINE_RESPONSE_PROCESSED); + caseGroupStatus, CategoryDTO.CategoryName.COMPLETED_TO_NOTSTARTED); // Then - assertEquals(CaseGroupStatus.COMPLETE, destinationState); + assertEquals(CaseGroupStatus.NOTSTARTED, destinationState); } }