// Path: src/main/java/org/netmelody/cieye/spies/jenkins/JenkinsCommunicator.java
// public final class JenkinsCommunicator {
// 
//     private final Contact contact;
//     private final String endpoint;
// 
//     public JenkinsCommunicator(String endpoint, Contact contact) {
//         this.endpoint = endpoint;
//         this.contact = contact;
//     }
//     
//     public String endpoint() {
//         return endpoint;
//     }
// 
//     public boolean canSpeakFor(Feature feature) {
//         return endpoint.equals(feature.endpoint());
//     }
//     
//     public void doJenkinsPost(String url) {
//         contact.doPost(url);
//     }
// 
//     public BuildDetail buildDetailsFor(String buildUrl) {
//         return makeJenkinsRestCall(buildUrl, BuildDetail.class);
//     }
// 
//     public JobDetail jobDetailFor(String jobEndpoint) {
//         return makeJenkinsRestCall(jobEndpoint, JobDetail.class);
//     }
// 
//     public String lastBadBuildFor(String jobEndpoint) {
//         return jobDetailFor(jobEndpoint).lastBadBuildUrl();
//     }
// 
//     public Collection<Job> jobsFor(View viewDigest) {
//         return makeJenkinsRestCall(viewDigest.url, ViewDetail.class).jobs();
//     }
// 
//     public Collection<View> views() {
//         return makeJenkinsRestCallWithSuffix("", Server.class).views();
//     }
//     
//     private <T> T makeJenkinsRestCallWithSuffix(String urlSuffix, Class<T> type) {
//         return makeJenkinsRestCall(endpoint + ((urlSuffix.length() == 0) ? "" : ("/" + urlSuffix)), type);
//     }
//     
//     private <T> T makeJenkinsRestCall(String url, Class<T> type) {
//         final String reqUrl = url + (url.endsWith("/") ? "" : "/") + "api/json";
//         return contact.makeJsonRestCall(reqUrl, type);
//     }
// }
// 
// Path: src/main/java/org/netmelody/cieye/spies/jenkins/jsondomain/ChangeSetItem.java
// public final class ChangeSetItem {
//     //Date date;
//     public String msg;
//     public String comment;
//     public long revision;
//     public String user;
//     //paths
// }


import com.google.common.base.Functions;
import com.google.gson.Gson;
import org.apache.commons.io.IOUtils;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.netmelody.cieye.server.observation.protocol.JsonRestRequester;
import org.netmelody.cieye.server.observation.test.StubGrapeVine;
import org.netmelody.cieye.spies.jenkins.JenkinsCommunicator;
import org.netmelody.cieye.spies.jenkins.jsondomain.BuildDetail;
import org.netmelody.cieye.spies.jenkins.jsondomain.ChangeSetItem;
import java.io.IOException;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
package org.netmelody.cieye.spies.jenkins.test;




public final class JenkinsCommunicatorTest {

    private final StubGrapeVine channel = new StubGrapeVine();

// Path: src/main/java/org/netmelody/cieye/spies/jenkins/JenkinsCommunicator.java
// public final class JenkinsCommunicator {
// 
//     private final Contact contact;
//     private final String endpoint;
// 
//     public JenkinsCommunicator(String endpoint, Contact contact) {
//         this.endpoint = endpoint;
//         this.contact = contact;
//     }
//     
//     public String endpoint() {
//         return endpoint;
//     }
// 
//     public boolean canSpeakFor(Feature feature) {
//         return endpoint.equals(feature.endpoint());
//     }
//     
//     public void doJenkinsPost(String url) {
//         contact.doPost(url);
//     }
// 
//     public BuildDetail buildDetailsFor(String buildUrl) {
//         return makeJenkinsRestCall(buildUrl, BuildDetail.class);
//     }
// 
//     public JobDetail jobDetailFor(String jobEndpoint) {
//         return makeJenkinsRestCall(jobEndpoint, JobDetail.class);
//     }
// 
//     public String lastBadBuildFor(String jobEndpoint) {
//         return jobDetailFor(jobEndpoint).lastBadBuildUrl();
//     }
// 
//     public Collection<Job> jobsFor(View viewDigest) {
//         return makeJenkinsRestCall(viewDigest.url, ViewDetail.class).jobs();
//     }
// 
//     public Collection<View> views() {
//         return makeJenkinsRestCallWithSuffix("", Server.class).views();
//     }
//     
//     private <T> T makeJenkinsRestCallWithSuffix(String urlSuffix, Class<T> type) {
//         return makeJenkinsRestCall(endpoint + ((urlSuffix.length() == 0) ? "" : ("/" + urlSuffix)), type);
//     }
//     
//     private <T> T makeJenkinsRestCall(String url, Class<T> type) {
//         final String reqUrl = url + (url.endsWith("/") ? "" : "/") + "api/json";
//         return contact.makeJsonRestCall(reqUrl, type);
//     }
// }
// 
// Path: src/main/java/org/netmelody/cieye/spies/jenkins/jsondomain/ChangeSetItem.java
// public final class ChangeSetItem {
//     //Date date;
//     public String msg;
//     public String comment;
//     public long revision;
//     public String user;
//     //paths
// }


// Path: src/test/java/org/netmelody/cieye/spies/jenkins/test/JenkinsCommunicatorTest.java
import com.google.common.base.Functions;
import com.google.gson.Gson;
import org.apache.commons.io.IOUtils;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.netmelody.cieye.server.observation.protocol.JsonRestRequester;
import org.netmelody.cieye.server.observation.test.StubGrapeVine;
import org.netmelody.cieye.spies.jenkins.JenkinsCommunicator;
import org.netmelody.cieye.spies.jenkins.jsondomain.BuildDetail;
import org.netmelody.cieye.spies.jenkins.jsondomain.ChangeSetItem;
import java.io.IOException;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;

package org.netmelody.cieye.spies.jenkins.test;




public final class JenkinsCommunicatorTest {

    private final StubGrapeVine channel = new StubGrapeVine();

    private JenkinsCommunicator communicator;