// Path: src/main/java/org/rundeck/plugin/salt/output/SaltApiResponseOutput.java
// public class SaltApiResponseOutput {
//     protected String jid;
//     protected List<String> minions;
// 
//     public String getJid() {
//         return jid;
//     }
// 
//     public List<String> getMinions() {
//         return minions == null ? Collections.<String>emptyList() : Collections.unmodifiableList(minions);
//     }
// }


import org.junit.Assert;
import org.junit.Test;
import org.rundeck.plugin.salt.SaltApiException;
import org.rundeck.plugin.salt.output.SaltApiResponseOutput;
package org.rundeck.plugin.salt.version;


public class Pre082SaltInteractionHandlerTest {

    protected SaltInteractionHandler handler = new Pre082SaltInteractionHandler();

    @Test
    public void testExtractOutputForJobSubmissionResponse() throws Exception {
        String jid = "20130903200912838566";
        String host1 = "host1";
        String host2 = "host2";
        String template = "[{\"return\": {\"jid\": \"%s\", \"minions\": [\"%s\", \"%s\"]}}]";
        String response = String.format(template, jid, host1, host2);
// Path: src/main/java/org/rundeck/plugin/salt/output/SaltApiResponseOutput.java
// public class SaltApiResponseOutput {
//     protected String jid;
//     protected List<String> minions;
// 
//     public String getJid() {
//         return jid;
//     }
// 
//     public List<String> getMinions() {
//         return minions == null ? Collections.<String>emptyList() : Collections.unmodifiableList(minions);
//     }
// }


// Path: src/test/java/org/rundeck/plugin/salt/version/Pre082SaltInteractionHandlerTest.java
import org.junit.Assert;
import org.junit.Test;
import org.rundeck.plugin.salt.SaltApiException;
import org.rundeck.plugin.salt.output.SaltApiResponseOutput;

package org.rundeck.plugin.salt.version;


public class Pre082SaltInteractionHandlerTest {

    protected SaltInteractionHandler handler = new Pre082SaltInteractionHandler();

    @Test
    public void testExtractOutputForJobSubmissionResponse() throws Exception {
        String jid = "20130903200912838566";
        String host1 = "host1";
        String host2 = "host2";
        String template = "[{\"return\": {\"jid\": \"%s\", \"minions\": [\"%s\", \"%s\"]}}]";
        String response = String.format(template, jid, host1, host2);
        SaltApiResponseOutput output = handler.extractOutputForJobSubmissionResponse(response);