@Test public void testReqResp_NullMapper() { NullDoubleClickOpenRtbMapper mapper = NullDoubleClickOpenRtbMapper.INSTANCE; assertThat( mapper.toExchangeBidResponse( OpenRtb.BidRequest.getDefaultInstance(), OpenRtb.BidResponse.getDefaultInstance())) .isNull(); assertThat(mapper.toOpenRtbBidRequest(TestData.newRequest())).isNull(); assertThat(mapper.toExchangeBidRequest(OpenRtb.BidRequest.getDefaultInstance())).isNull(); assertThat( mapper.toOpenRtbBidResponse( TestData.newRequest(), NetworkBid.BidResponse.getDefaultInstance())) .isNull(); }
@Test public void testExtMapper() { ExtMapper extMapper = new ExtMapper() {}; extMapper.toOpenRtbBidRequest( NetworkBid.BidRequest.getDefaultInstance(), OpenRtb.BidRequest.newBuilder()); extMapper.toOpenRtbDevice( NetworkBid.BidRequest.getDefaultInstance(), OpenRtb.BidRequest.Device.newBuilder()); extMapper.toOpenRtbImp( NetworkBid.BidRequest.AdSlot.getDefaultInstance(), OpenRtb.BidRequest.Imp.newBuilder()); extMapper.toOpenRtbBanner( NetworkBid.BidRequest.AdSlot.getDefaultInstance(), OpenRtb.BidRequest.Imp.Banner.newBuilder()); extMapper.toOpenRtbVideo( NetworkBid.BidRequest.Video.getDefaultInstance(), OpenRtb.BidRequest.Imp.Video.newBuilder()); extMapper.toOpenRtbPmp( NetworkBid.BidRequest.AdSlot.MatchingAdData.getDefaultInstance(), OpenRtb.BidRequest.Imp.Pmp.newBuilder()); extMapper.toDoubleClickAd( OpenRtb.BidRequest.getDefaultInstance(), OpenRtb.BidResponse.SeatBid.Bid.getDefaultInstance(), NetworkBid.BidResponse.Ad.newBuilder()); }