// Path: src/main/java/io/teknek/intravert/client/Client.java
// public class Client {
// 
//   private ObjectMapper MAPPER = new ObjectMapper();
//   private DefaultHttpClient httpClient = new DefaultHttpClient();
//   
//   @Deprecated
//   public String postAsString(String url, String message)
//           throws IOException, IllegalStateException, UnsupportedEncodingException, RuntimeException {
// 
//     HttpPost postRequest = new HttpPost(url);
// 
//     StringEntity input = new StringEntity(message);
//     input.setContentType("application/json");
//     postRequest.setEntity(input);
// 
//     HttpResponse response = httpClient.execute(postRequest);
// 
//     if (response.getStatusLine().getStatusCode() != 200) {
//       throw new RuntimeException("Failed : HTTP error code : "
//               + response.getStatusLine().getStatusCode());
//     }
// 
//     BufferedReader br = new BufferedReader(new InputStreamReader(
//             (response.getEntity().getContent())));
// 
//     String output;
//     StringBuffer totalOutput = new StringBuffer();
//     System.out.println("Output from Server .... \n");
//     while ((output = br.readLine()) != null) {
//       System.out.println(output);
//       totalOutput.append(output);
//     }
//     return totalOutput.toString();
//   }
//   
//   public Response post(String url, Request request)
//           throws IOException, IllegalStateException, UnsupportedEncodingException, RuntimeException {
//     HttpPost postRequest = new HttpPost(url);
//     ByteArrayEntity input = new ByteArrayEntity(MAPPER.writeValueAsBytes(request));
//     input.setContentType("application/json");
//     postRequest.setEntity(input);
//     HttpResponse response = httpClient.execute(postRequest);
//     if (response.getStatusLine().getStatusCode() != 200) {
//       throw new RuntimeException("Failed : HTTP error code : "
//               + response.getStatusLine().getStatusCode());
//     }
//     Response r = MAPPER.readValue(response.getEntity().getContent(), Response.class);
//     response.getEntity().getContent().close();
//     return r;
//   }
//   
// }
// 
// Path: src/main/java/io/teknek/intravert/model/Request.java
// public class Request {
//   private List<Operation> operations;
//   
//   public Request(){
//     operations = new ArrayList<Operation>();
//   }
// 
//   public List<Operation> getOperations() {
//     return operations;
//   }
// 
//   public void setOperations(List<Operation> operations) {
//     this.operations = operations;
//   }
//   
// }
// 
// Path: src/main/java/io/teknek/intravert/model/Response.java
// public class Response {
//   private String exceptionMessage;
//   private String exceptionId;
//   private LinkedHashMap<String,Object> results;
//   private LinkedHashMap<String,Object> metaData;
//   
//   public Response(){
//     results = new LinkedHashMap<String,Object>();
//     metaData = new LinkedHashMap<String,Object>();
//   }
// 
//   public String getExceptionMessage() {
//     return exceptionMessage;
//   }
// 
//   public void setExceptionMessage(String exceptionMessage) {
//     this.exceptionMessage = exceptionMessage;
//   }
// 
//   public String getExceptionId() {
//     return exceptionId;
//   }
// 
//   public void setExceptionId(String exceptionId) {
//     this.exceptionId = exceptionId;
//   }
// 
//   public Map<String, Object> getResults() {
//     return results;
//   }
// 
//   public void setResults(LinkedHashMap<String, Object> results) {
//     this.results = results;
//   }
// 
//   public Map<String, Object> getMetaData() {
//     return metaData;
//   }
// 
//   public void setMetaData(LinkedHashMap<String, Object> metaData) {
//     this.metaData = metaData;
//   }
//   
// }


import io.teknek.intravert.client.Client;
import io.teknek.intravert.model.Request;
import io.teknek.intravert.model.Response;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import junit.framework.Assert;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig.Feature;
import org.junit.Before;
import org.junit.Test;
package io.teknek.intravert.daemon;





public class JsonFileTest extends BaseIntravertTest {

  private File jtest;
  
  @Before
  public void before(){
    File resources = new File("src/test/resources");
    jtest = new File(resources, "jtest");
  }
  
  public void innerTest(String testname) throws JsonParseException, JsonMappingException, IOException{
    File testDir = new File(jtest, testname);
    if (!testDir.isDirectory()){
      throw new RuntimeException(testDir+" is not a directory");
    }
    File input = new File(testDir, "input.json");
    File output = new File(testDir, "output.json");
// Path: src/main/java/io/teknek/intravert/client/Client.java
// public class Client {
// 
//   private ObjectMapper MAPPER = new ObjectMapper();
//   private DefaultHttpClient httpClient = new DefaultHttpClient();
//   
//   @Deprecated
//   public String postAsString(String url, String message)
//           throws IOException, IllegalStateException, UnsupportedEncodingException, RuntimeException {
// 
//     HttpPost postRequest = new HttpPost(url);
// 
//     StringEntity input = new StringEntity(message);
//     input.setContentType("application/json");
//     postRequest.setEntity(input);
// 
//     HttpResponse response = httpClient.execute(postRequest);
// 
//     if (response.getStatusLine().getStatusCode() != 200) {
//       throw new RuntimeException("Failed : HTTP error code : "
//               + response.getStatusLine().getStatusCode());
//     }
// 
//     BufferedReader br = new BufferedReader(new InputStreamReader(
//             (response.getEntity().getContent())));
// 
//     String output;
//     StringBuffer totalOutput = new StringBuffer();
//     System.out.println("Output from Server .... \n");
//     while ((output = br.readLine()) != null) {
//       System.out.println(output);
//       totalOutput.append(output);
//     }
//     return totalOutput.toString();
//   }
//   
//   public Response post(String url, Request request)
//           throws IOException, IllegalStateException, UnsupportedEncodingException, RuntimeException {
//     HttpPost postRequest = new HttpPost(url);
//     ByteArrayEntity input = new ByteArrayEntity(MAPPER.writeValueAsBytes(request));
//     input.setContentType("application/json");
//     postRequest.setEntity(input);
//     HttpResponse response = httpClient.execute(postRequest);
//     if (response.getStatusLine().getStatusCode() != 200) {
//       throw new RuntimeException("Failed : HTTP error code : "
//               + response.getStatusLine().getStatusCode());
//     }
//     Response r = MAPPER.readValue(response.getEntity().getContent(), Response.class);
//     response.getEntity().getContent().close();
//     return r;
//   }
//   
// }
// 
// Path: src/main/java/io/teknek/intravert/model/Request.java
// public class Request {
//   private List<Operation> operations;
//   
//   public Request(){
//     operations = new ArrayList<Operation>();
//   }
// 
//   public List<Operation> getOperations() {
//     return operations;
//   }
// 
//   public void setOperations(List<Operation> operations) {
//     this.operations = operations;
//   }
//   
// }
// 
// Path: src/main/java/io/teknek/intravert/model/Response.java
// public class Response {
//   private String exceptionMessage;
//   private String exceptionId;
//   private LinkedHashMap<String,Object> results;
//   private LinkedHashMap<String,Object> metaData;
//   
//   public Response(){
//     results = new LinkedHashMap<String,Object>();
//     metaData = new LinkedHashMap<String,Object>();
//   }
// 
//   public String getExceptionMessage() {
//     return exceptionMessage;
//   }
// 
//   public void setExceptionMessage(String exceptionMessage) {
//     this.exceptionMessage = exceptionMessage;
//   }
// 
//   public String getExceptionId() {
//     return exceptionId;
//   }
// 
//   public void setExceptionId(String exceptionId) {
//     this.exceptionId = exceptionId;
//   }
// 
//   public Map<String, Object> getResults() {
//     return results;
//   }
// 
//   public void setResults(LinkedHashMap<String, Object> results) {
//     this.results = results;
//   }
// 
//   public Map<String, Object> getMetaData() {
//     return metaData;
//   }
// 
//   public void setMetaData(LinkedHashMap<String, Object> metaData) {
//     this.metaData = metaData;
//   }
//   
// }


// Path: src/test/java/io/teknek/intravert/daemon/JsonFileTest.java
import io.teknek.intravert.client.Client;
import io.teknek.intravert.model.Request;
import io.teknek.intravert.model.Response;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import junit.framework.Assert;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig.Feature;
import org.junit.Before;
import org.junit.Test;

package io.teknek.intravert.daemon;





public class JsonFileTest extends BaseIntravertTest {

  private File jtest;
  
  @Before
  public void before(){
    File resources = new File("src/test/resources");
    jtest = new File(resources, "jtest");
  }
  
  public void innerTest(String testname) throws JsonParseException, JsonMappingException, IOException{
    File testDir = new File(jtest, testname);
    if (!testDir.isDirectory()){
      throw new RuntimeException(testDir+" is not a directory");
    }
    File input = new File(testDir, "input.json");
    File output = new File(testDir, "output.json");
    Client c = new Client();