diff --git a/src/test/java/de/szut/lf8_starter/integration/project/CreateProjectActionTest.java b/src/test/java/de/szut/lf8_starter/integration/project/CreateProjectActionTest.java index 6a340ca..27fe186 100644 --- a/src/test/java/de/szut/lf8_starter/integration/project/CreateProjectActionTest.java +++ b/src/test/java/de/szut/lf8_starter/integration/project/CreateProjectActionTest.java @@ -12,7 +12,9 @@ import org.springframework.test.web.servlet.MockMvc; import java.time.LocalDate; import java.util.Arrays; +import java.util.Optional; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; @@ -59,7 +61,7 @@ class CreateProjectActionTest { final long id = Long.parseLong(new JSONObject(contentAsString).get("id").toString()); - final ProjectEntity project = this.projectRepository.findById(id); + final Optional project = this.projectRepository.findById(id); assertThat(project.get().getName()).isEqualTo("name"); assertThat(project.get().getLeadingEmployee()).isEqualTo(1); assertThat(project.get().getContractor()).isEqualTo(4);