@@ -63,7 +63,7 @@ public void makeHttpRequestsShouldReturnErrorWhenRequestHasInvalidExtImpression(
6363 @ Test
6464 public void makeHttpRequestsShouldReturnErrorWhenRequestHasMissingTagIdAndPlacementId () {
6565 // given
66- final ObjectNode mobkoiExt = impExt (null , null );
66+ final ObjectNode mobkoiExt = impExt (null );
6767 final BidRequest bidRequest = givenBidRequest (impBuilder -> impBuilder .ext (mobkoiExt ));
6868
6969 // when
@@ -79,7 +79,7 @@ public void makeHttpRequestsShouldReturnErrorWhenRequestHasMissingTagIdAndPlacem
7979 @ Test
8080 public void makeHttpRequestsShouldAddPlacementIdOnlyInFirstImpressionTagId () {
8181 // given
82- final ObjectNode mobkoiExt = impExt ("pid" , null );
82+ final ObjectNode mobkoiExt = impExt ("pid" );
8383 final Imp givenImp1 = givenImp (impBuilder -> impBuilder .ext (mobkoiExt ));
8484 final Imp givenImp2 = givenImp (identity ());
8585 final BidRequest bidRequest = BidRequest .builder ().imp (asList (givenImp1 , givenImp2 )).build ();
@@ -95,48 +95,6 @@ public void makeHttpRequestsShouldAddPlacementIdOnlyInFirstImpressionTagId() {
9595 .containsExactly ("pid" , null );
9696 }
9797
98- @ Test
99- public void makeHttpRequestsShouldUseConstructorEndpointWhenNoCustomEndpointIsDefinedInMobkoiExtension () {
100- // given
101- final ObjectNode mobkoiExt = impExt ("pid" , null );
102- final BidRequest bidRequest = givenBidRequest (impBuilder -> impBuilder .ext (mobkoiExt ));
103-
104- // when
105- final Result <List <HttpRequest <BidRequest >>> results = target .makeHttpRequests (bidRequest );
106-
107- // then
108- assertThat (results .getValue ()).extracting (HttpRequest ::getUri ).containsExactly ("https://test.endpoint.com/bid" );
109- assertThat (results .getErrors ()).isEmpty ();
110- }
111-
112- @ Test
113- public void makeHttpRequestsShouldConstructWithDefaultEndpointWhenTheCustomURLIsInvalidInMobkoiExtension () {
114- // given
115- final ObjectNode mobkoiExt = impExt ("pid" , "invalid URI" );
116- final BidRequest bidRequest = givenBidRequest (impBuilder -> impBuilder .ext (mobkoiExt ));
117-
118- // when
119- final Result <List <HttpRequest <BidRequest >>> result = target .makeHttpRequests (bidRequest );
120-
121- // then
122- assertThat (result .getValue ()).extracting (HttpRequest ::getUri ).containsExactly ("https://test.endpoint.com/bid" );
123- assertThat (result .getErrors ()).isEmpty ();
124- }
125-
126- @ Test
127- public void makeHttpRequestsShouldUseCustomEndpointWhenDefinedInMobkoiExtension () {
128- // given
129- final ObjectNode mobkoiExt = impExt ("pid" , "https://custom.endpoint.com" );
130- final BidRequest bidRequest = givenBidRequest (impBuilder -> impBuilder .ext (mobkoiExt ));
131-
132- // when
133- final Result <List <HttpRequest <BidRequest >>> result = target .makeHttpRequests (bidRequest );
134-
135- // then
136- assertThat (result .getValue ()).extracting (HttpRequest ::getUri ).containsExactly ("https://custom.endpoint.com/bid" );
137- assertThat (result .getErrors ()).isEmpty ();
138- }
139-
14098 @ Test
14199 public void makeHttpRequestsShouldOverrideUserExtAndSetConsent () {
142100 // given
@@ -235,11 +193,11 @@ private static BidRequest givenBidRequest(
235193 }
236194
237195 private static Imp givenImp (UnaryOperator <Imp .ImpBuilder > impCustomizer ) {
238- return impCustomizer .apply (Imp .builder ().id ("imp_id" ).ext (impExt ("placementIdValue" , null ))).build ();
196+ return impCustomizer .apply (Imp .builder ().id ("imp_id" ).ext (impExt ("placementIdValue" ))).build ();
239197 }
240198
241- private static ObjectNode impExt (String placementId , String adServerBaseUrl ) {
242- return mapper .valueToTree (ExtPrebid .of (null , ExtImpMobkoi .of (placementId , adServerBaseUrl )));
199+ private static ObjectNode impExt (String placementId ) {
200+ return mapper .valueToTree (ExtPrebid .of (null , ExtImpMobkoi .of (placementId )));
243201 }
244202
245203 private static BidResponse givenBidResponse (UnaryOperator <Bid .BidBuilder > bidCustomizer ) {
0 commit comments