<commit_before>package com.plivo.api;

import com.plivo.api.models.campaign.*;
import com.plivo.api.models.base.*;
import org.junit.Before;
import org.junit.Test;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

import static junit.framework.TestCase.assertEquals;

public class CampaignTest extends BaseTest {
    private PlivoClient client;
    @Before
    public void setUp() throws Exception {
        super.setUp();
        client = new PlivoClient("MA123456789012345678",
        "Zmxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    }

    @Test
    public void campaignCreateShouldSucceed() throws Exception {
        String fixtureName = "campaignCreateResponse.json";

        expectResponse(fixtureName, 202);
        String[] sub_usecase = new String[]{"2FA", "MARKETING"};
        Campaign.creator("BCKWPKX", "java sdk camp create", "ENTERTAINMENT", "2FA", sub_usecase, "description", false,false, false, false, true, true,true, true, "sample1", "sample2", null,  null).create();

        assertRequest("POST", "10dlc/Campaign/");
    }

    @Test
    public void campaignGetShouldSucceed() throws Exception {
        String fixtureName = "campaignGetResponse.json";

        expectResponse(fixtureName, 202);
        String campaignID = "CY5NVUA";
        Boolean embeddedLink = false;

        Campaign response = Campaign.getter(campaignID).get();

        assertRequest("GET", "10dlc/Campaign/%s/", campaignID);
        assertEquals(campaignID, response.getCampaign().getCampaignID());
        assertEquals(embeddedLink, response.getCampaign().getCampaignAttributes().getEmbeddedLink());
    }

    @Test
    public void campaignListShouldSucceed() throws Exception {
        String fixtureName = "campaignListResponse.json";

        expectResponse(fixtureName, 202);
        ListResponse<Campaign> response = Campaign.lister().limit(2).offset(0).list();

        assertRequest("GET", "10dlc/Campaign/");
    }
<commit_msg>campaign creator ut<commit_after>package com.plivo.api;

import com.plivo.api.models.campaign.*;
import com.plivo.api.models.base.*;
import org.junit.Before;
import org.junit.Test;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

import static junit.framework.TestCase.assertEquals;

public class CampaignTest extends BaseTest {
    private PlivoClient client;
    @Before
    public void setUp() throws Exception {
        super.setUp();
        client = new PlivoClient("MA123456789012345678",
        "Zmxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    }

    @Test
    public void campaignCreateShouldSucceed() throws Exception {
        String fixtureName = "campaignCreateResponse.json";

        expectResponse(fixtureName, 202);
        String[] sub_usecase = new String[]{"2FA", "MARKETING"};
        Campaign.creator("BCKWPKX", "java sdk camp create", "ENTERTAINMENT", "2FA", sub_usecase, "description", false,false, false, false, true, true,true, true, "sample1", "sample2", "url", "method", "helpMessage", "messageFlow", "optoutMessage", "optinKeywords", "optinMessage", "optoutKeywords", "helpKeywords").create();

        assertRequest("POST", "10dlc/Campaign/");
    }

    @Test
    public void campaignGetShouldSucceed() throws Exception {
        String fixtureName = "campaignGetResponse.json";

        expectResponse(fixtureName, 202);
        String campaignID = "CY5NVUA";
        Boolean embeddedLink = false;

        Campaign response = Campaign.getter(campaignID).get();

        assertRequest("GET", "10dlc/Campaign/%s/", campaignID);
        assertEquals(campaignID, response.getCampaign().getCampaignID());
        assertEquals(embeddedLink, response.getCampaign().getCampaignAttributes().getEmbeddedLink());
    }

    @Test
    public void campaignListShouldSucceed() throws Exception {
        String fixtureName = "campaignListResponse.json";

        expectResponse(fixtureName, 202);
        ListResponse<Campaign> response = Campaign.lister().limit(2).offset(0).list();

        assertRequest("GET", "10dlc/Campaign/");
    }

{'fraction_non_alphanumeric': 0.12327755905511811, 'fraction_numerical': 0.01968503937007874, 'mean_word_length': 3.879951980792317, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5281236', 'n_tokens_mistral': 1250, 'n_tokens_neox': 1144, 'n_words': 245}