<commit_before>package com.heroku;

import com.atlassian.bamboo.collections.ActionParametersMap;
import com.atlassian.bamboo.security.StringEncrypter;
import com.atlassian.bamboo.webwork.util.ActionParametersMapImpl;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;

import static com.heroku.AbstractDeploymentTaskConfigurator.API_KEY;

/**
 * @author <NAME>
 */
public class ArtifactDeploymentTasksTest extends MockObjectTestCase {

    private static final String PLAIN_TEXT_KEY = "PLAIN_TEXT";
    private static final String ENCRYPTED_KEY = new StringEncrypter().encrypt(PLAIN_TEXT_KEY);

    public void testApiKeyEncryption_Blank() throws Exception {
        final Mock mockParams = new Mock(ActionParametersMap.class);
        mockParams.expects(atLeastOnce()).method("containsKey").will(returnValue(false));
        mockParams.expects(never()).method("getString");
        mockParams.expects(never()).method("put");

        new TestingDeploymentTaskConfigurator().encryptApiKey((ActionParametersMap) mockParams.proxy());
        mockParams.verify();
    }
<commit_msg>import optimization<commit_after>package com.heroku;

import com.atlassian.bamboo.collections.ActionParametersMap;
import com.atlassian.bamboo.security.StringEncrypter;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;

import java.util.Collections;
import java.util.List;

import static com.heroku.AbstractDeploymentTaskConfigurator.API_KEY;

/**
 * @author <NAME>
 */
public class ArtifactDeploymentTasksTest extends MockObjectTestCase {

    private static final String PLAIN_TEXT_KEY = "PLAIN_TEXT";
    private static final String ENCRYPTED_KEY = new StringEncrypter().encrypt(PLAIN_TEXT_KEY);

    public void testApiKeyEncryption_Blank() throws Exception {
        final Mock mockParams = new Mock(ActionParametersMap.class);
        mockParams.expects(atLeastOnce()).method("containsKey").will(returnValue(false));
        mockParams.expects(never()).method("getString");
        mockParams.expects(never()).method("put");

        new TestingDeploymentTaskConfigurator().encryptApiKey((ActionParametersMap) mockParams.proxy());
        mockParams.verify();
    }

{'fraction_non_alphanumeric': 0.10533333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 5.376770538243626, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '2366552', 'n_tokens_mistral': 660, 'n_tokens_neox': 641, 'n_words': 113}