Skip to content

Commit

Permalink
use autowired mapper instead of blank version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-WorkGH committed Jun 10, 2024
1 parent 6a6996f commit 31be269
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/test/java/org/gridsuite/study/server/StudyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,6 @@ public void testDuplicateStudyWithErrorDuringCaseDuplication() throws Exception
.header(USER_ID_HEADER, "userId"))
.andExpect(status().isOk()).andReturn().getResponse().getContentAsString();

ObjectMapper mapper = new ObjectMapper();
String duplicatedStudyUuid = mapper.readValue(response, String.class);
assertNotNull(output.receive(TIMEOUT, studyUpdateDestination));

Expand All @@ -1530,7 +1529,6 @@ private StudyEntity duplicateStudy(UUID studyUuid, String userId, String caseFor
String response = mockMvc.perform(post(STUDIES_URL + "?duplicateFrom={studyUuid}", studyUuid)
.header(USER_ID_HEADER, "userId"))
.andExpect(status().isOk()).andReturn().getResponse().getContentAsString();
ObjectMapper mapper = new ObjectMapper();
String newUuid = mapper.readValue(response, String.class);
StudyEntity sourceStudy = studyRepository.findById(studyUuid).orElseThrow();
assertNotNull(output.receive(TIMEOUT, studyUpdateDestination));
Expand Down

0 comments on commit 31be269

Please sign in to comment.