package test.java;

/**
 * Created by ben on 7/3/17.
 */
public class TestC1X {
}

@@ -17,66 +17,2068 @@
 a;%0A%0A
-/**%0A * Created by ben on 7/3/17.%0A */%0Apublic class TestC1X %7B
+import com.xrtb.common.HttpPostGet;%0Aimport com.xrtb.pojo.BidRequest;%0Aimport com.xrtb.pojo.WinObject;%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.concurrent.CountDownLatch;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Created by ben on 7/3/17.%0A */%0Apublic class TestC1X %7B%0A%0A    String price = null;%0A    String adId = null;%0A    String creativeId = null;%0A%0A    @BeforeClass%0A    public static void setup() %7B%0A        try %7B%0A            Config.setup();%0A            System.out.println(%22******************  TestCampaignProcessor%22);%0A        %7D catch (Exception e) %7B%0A            // TODO Auto-generated catch block%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    @AfterClass%0A    public static void stop() %7B%0A        Config.teardown();%0A    %7D%0A%0A%0A    @Test%0A    public void testPiggyBackedWins() throws Exception %7B%0A%0A        HttpPostGet http = new HttpPostGet();%0A        final CountDownLatch latch = new CountDownLatch(1);%0A        com.xrtb.jmq.RTopic channel = new com.xrtb.jmq.RTopic(%22tcp://*:5572&wins%22);%0A        channel.subscribe(%22wins%22);%0A%0A        channel.addListener(new com.xrtb.jmq.MessageListener%3CWinObject%3E() %7B%0A            @Override%0A            public void onMessage(String channel, WinObject win) %7B%0A                price = win.price;%0A                adId = win.adId;%0A                creativeId = win.cridId;%0A                latch.countDown();%0A            %7D%0A        %7D);%0A%0A%0A        String pixel = %22http://localhost:8080/pixel/exchange=c1x/ad_id=thead/creative_id=thecreative/bid_id=123456/price=0.23%22;%0A        http.sendPost(pixel, %22%22,300000,300000);%0A        latch.await(5, TimeUnit.SECONDS);%0A%0A        List%3CMap%3E maps = BidRequest.getExchangeCounts();%0A        Map x = (Map)maps.get(0);%0A%0A        System.out.println(%22=================%3E%22 + x);%0A        long test = (Long)x.get(%22wins%22);%0A%0A        assertTrue(price.equals(%220.23%22));%0A        assertTrue(creativeId .equals(%22thecreative%22));%0A        assertTrue(adId.equals(%22thead%22));%0A    %7D%0A
 %0A%7D%0A

Add a new file to handle C1X specific qa issues.