diff --git a/src/test/java/org/prebid/server/it/OpenxTest.java b/src/test/java/org/prebid/server/it/OpenxTest.java index c157e355b18..acbb6015bef 100644 --- a/src/test/java/org/prebid/server/it/OpenxTest.java +++ b/src/test/java/org/prebid/server/it/OpenxTest.java @@ -17,13 +17,28 @@ public class OpenxTest extends IntegrationTest { @Test public void openrtb2AuctionShouldRespondWithBidsFromOpenx() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/openx-exchange")) + .withRequestBody(equalToJson(jsonFrom("openrtb2/openx/test-openx-bid-request.json"))) + .willReturn(aResponse().withBody(jsonFrom("openrtb2/openx/test-openx-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/openx/test-auction-openx-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/openx/test-auction-openx-response.json", response, singletonList("openx")); + } + + @Test + public void openrtb2AuctionWithNativeShouldRespondWithBidsFromOpenx() throws IOException, JSONException { // given WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/openx-exchange")) .withRequestBody(equalToJson(jsonFrom("openrtb2/openx/test-native-request.json"))) .willReturn(aResponse().withBody(jsonFrom("openrtb2/openx/test-native-response.json")))); // when - final Response response = responseFor("openrtb2/openx/test-native-response.json", + final Response response = responseFor("openrtb2/openx/test-native-request.json", Endpoint.openrtb2_auction); // then