diff --git a/config/owasp/suppressions.xml b/config/owasp/suppressions.xml
index 3186c5190..2e5ddf5b7 100644
--- a/config/owasp/suppressions.xml
+++ b/config/owasp/suppressions.xml
@@ -17,5 +17,4 @@
^pkg:maven/org\.yaml/snakeyaml@.*$
CVE-2022-1471
-
diff --git a/src/test/java/uk/gov/hmcts/reform/judicialapi/controller/service/impl/JudicialUserServiceImplTest.java b/src/test/java/uk/gov/hmcts/reform/judicialapi/controller/service/impl/JudicialUserServiceImplTest.java
index 473fc9396..e537e7223 100644
--- a/src/test/java/uk/gov/hmcts/reform/judicialapi/controller/service/impl/JudicialUserServiceImplTest.java
+++ b/src/test/java/uk/gov/hmcts/reform/judicialapi/controller/service/impl/JudicialUserServiceImplTest.java
@@ -55,6 +55,8 @@
import static java.nio.charset.Charset.defaultCharset;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.any;
@@ -439,6 +441,7 @@ void test_refreshUserProfile_BasedOnPersonalCodes_Error() throws JsonProcessingE
@Test
+ @SuppressWarnings("unchecked")
void test_refreshUserProfile_BasedOnPersonalCodes_200() {
var userProfile = buildUserProfileIac();
@@ -465,12 +468,23 @@ void test_refreshUserProfile_BasedOnPersonalCodes_200() {
null, null, Arrays.asList("Emp", "Emp", null));
var responseEntity = judicialUserService.refreshUserProfile(refreshRoleRequest, 1,
0, "ASC", "objectId");
-
+ List
+ userProfileRefreshResponses = (List) responseEntity.getBody();
assertEquals(200, responseEntity.getStatusCodeValue());
+ assertNotNull(userProfileRefreshResponses.get(0).getAppointments().get(0).getStartDate());
+ assertNull(userProfileRefreshResponses.get(0).getAppointments().get(0).getEndDate());
+ assertNotNull(userProfileRefreshResponses.get(0).getAuthorisations().get(0).getStartDate());
+ assertNull(userProfileRefreshResponses.get(0).getAuthorisations().get(0).getEndDate());
+ assertNull(userProfileRefreshResponses.get(0).getAppointments().get(0).getCftRegionID());
+ assertNull(userProfileRefreshResponses.get(0).getAppointments().get(0).getCftRegion());
+ assertNotNull(userProfileRefreshResponses.get(0).getAuthorisations().get(0).getServiceCodes().get(0));
+ assertNotNull(userProfileRefreshResponses.get(0).getAppointments().get(0).getEpimmsId());
+
}
@Test
- void test_refreshUserProfile_BasedOnPersonalCodes_400() throws JsonProcessingException {
+ void test_refreshUserProfile_BasedOnPersonalCodes_400() throws JsonProcessingException {
var refreshRoleRequest = new RefreshRoleRequest("",
null, null, Arrays.asList("Emp", "Emp", null));