diff --git a/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java b/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java index 6ba44d03..2af42238 100644 --- a/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java +++ b/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java @@ -22,7 +22,6 @@ import com.sdl.odata.client.api.exception.ODataClientRuntimeException; import com.sdl.odata.client.api.exception.ODataClientTimeout; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Value; @@ -57,7 +56,6 @@ @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestConfiguration.class) @DirtiesContext -@Disabled public class BasicEndpointCallerTest { private static final String RESPONSE = "/response.xml"; diff --git a/odata_client/src/test/java/com/sdl/odata/client/caller/MockController.java b/odata_client/src/test/java/com/sdl/odata/client/caller/MockController.java index 27852419..cbeb6a6c 100644 --- a/odata_client/src/test/java/com/sdl/odata/client/caller/MockController.java +++ b/odata_client/src/test/java/com/sdl/odata/client/caller/MockController.java @@ -15,28 +15,28 @@ */ package com.sdl.odata.client.caller; -import java.io.IOException; -import java.io.InputStream; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Component; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import java.io.IOException; +import java.io.InputStream; + import static java.nio.charset.StandardCharsets.UTF_8; import static org.springframework.util.StreamUtils.copyToString; /** * MockController. */ -@Component -@RequestMapping("/") +@Controller class MockController { private static final String RESPONSE = "response.xml"; @RequestMapping(value = "{code:\\d{3}}") - ResponseEntity respondWithCode(@PathVariable int code) throws IOException { + ResponseEntity respondWithCode(@PathVariable("code") int code) throws IOException { return ResponseEntity.status(HttpStatus.valueOf(code)).body(String.valueOf(code)); }