From 44ba3a02b984e62ba3bd7f3083a6d79dfa696f71 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 13 Mar 2021 17:35:42 +0100 Subject: [PATCH] WIP --- .../consumer/adapter/RemoteUsersServiceConsumerIT.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/consumer/src/test/java/de/juplo/demos/consumer/adapter/RemoteUsersServiceConsumerIT.java b/consumer/src/test/java/de/juplo/demos/consumer/adapter/RemoteUsersServiceConsumerIT.java index 0eacb8f..f3786af 100644 --- a/consumer/src/test/java/de/juplo/demos/consumer/adapter/RemoteUsersServiceConsumerIT.java +++ b/consumer/src/test/java/de/juplo/demos/consumer/adapter/RemoteUsersServiceConsumerIT.java @@ -19,6 +19,7 @@ import org.springframework.web.client.RestTemplate; import java.io.IOException; import java.util.Map; import java.util.Optional; +import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -36,7 +37,6 @@ public class RemoteUsersServiceConsumerIT .path("/get") .query("email=pact@juplo.de") .method("GET") - .headers("Accept", "application/json") .willRespondWith() .status(200) .headers(Map.of("Content-Type", "application/json;charset=UTF-8")) @@ -48,13 +48,13 @@ public class RemoteUsersServiceConsumerIT @PactTestFor(pactMethod = "getExistingUserByEmail") public void testGetExistingUserByEmail(MockServer mockServer) { RestTemplate restTemplate = new RestTemplateBuilder().rootUri(mockServer.getUrl()).build(); - RemoteUsersServiceConsumer usersService = new RemoteUsersServiceConsumer("/path?email={email}", restTemplate); + RemoteUsersServiceConsumer usersService = new RemoteUsersServiceConsumer("/get?email={email}", restTemplate); try { Optional result = usersService.getUserByEmail("pact@juplo.de"); assertThat(result.isPresent()).isTrue(); User user = result.get(); - assertThat(user.getId()).isEqualTo("123e4567-e89b-12d3-a456-426614174000"); + assertThat(user.getId()).isEqualTo(UUID.fromString("123e4567-e89b-12d3-a456-426614174000")); assertThat(user.getEmail()).isEqualTo("pact@juplo.de"); } catch (Exception e) { -- 2.20.1