From 04069544779dc6bbb74e177a6c77f2423c908edc Mon Sep 17 00:00:00 2001 From: PK Jacob Date: Fri, 22 Nov 2024 17:30:23 -0500 Subject: [PATCH] s --- .../data/service/resource/impl/ResourceServiceImplTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/folio/linked/data/service/resource/impl/ResourceServiceImplTest.java b/src/test/java/org/folio/linked/data/service/resource/impl/ResourceServiceImplTest.java index 2a9bcb54..1beeec1c 100644 --- a/src/test/java/org/folio/linked/data/service/resource/impl/ResourceServiceImplTest.java +++ b/src/test/java/org/folio/linked/data/service/resource/impl/ResourceServiceImplTest.java @@ -15,6 +15,7 @@ import static org.mockito.Mockito.when; import java.util.HashMap; +import java.util.List; import java.util.Optional; import java.util.UUID; import org.folio.linked.data.domain.dto.InstanceField; @@ -207,7 +208,7 @@ void getResourceIdByInventoryId_shouldThrowRequestProcessingException_ifNoEntity void update_shouldSaveUpdatedResourceAndSendResourceUpdatedEvent_forResourceWithSameId() { // given var id = randomLong(); - var workDto = new ResourceRequestDto().resource(new WorkField().work(new WorkRequest())); + var workDto = new ResourceRequestDto().resource(new WorkField().work(new WorkRequest(List.of()))); var oldWork = new Resource().setId(id).addTypes(WORK).setLabel("oldWork"); when(resourceRepo.findById(id)).thenReturn(Optional.of(oldWork)); var work = new Resource().setId(id).setLabel("saved").addTypes(WORK); @@ -237,7 +238,7 @@ void update_shouldSaveUpdatedResourceAndSendReplaceEvent_forResourceWithDifferen when(resourceRepo.findById(oldId)).thenReturn(Optional.of(oldInstance)); var mapped = new Resource().setId(newId).setLabel("mapped"); var instanceDto = - new ResourceRequestDto().resource(new InstanceField().instance(new InstanceRequest())); + new ResourceRequestDto().resource(new InstanceField().instance(new InstanceRequest(List.of()))); when(resourceDtoMapper.toEntity(instanceDto)).thenReturn(mapped); var persisted = new Resource().setId(newId).setLabel("saved"); var expectedDto = new ResourceResponseDto().resource(