// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public class GroundException extends Exception {
// 
//   private static final long serialVersionUID = 1L;
// 
//   private final String message;
//   private final ExceptionType exceptionType;
// 
//   public enum ExceptionType {
//     DB("Database Exception:", "%s"),
//     ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//     VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//     ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//     OTHER("GroundException", "%s");
// 
//     String name;
//     String description;
// 
//     ExceptionType(String name, String description) {
//       this.name = name;
//       this.description = description;
//     }
// 
//     public String format(String... values) {
//       return String.format(this.description, values);
//     }
//   }
// 
//   public GroundException(ExceptionType exceptionType, String... values) {
//     this.exceptionType = exceptionType;
//     this.message = this.exceptionType.format(values);
//   }
// 
//   public GroundException(Exception exception) {
//     this.exceptionType = ExceptionType.OTHER;
//     this.message = this.exceptionType.format(exception.getMessage());
//   }
// 
//   @Override
//   public String getMessage() {
//     return this.message;
//   }
// 
//   public ExceptionType getExceptionType() {
//     return this.exceptionType;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public enum ExceptionType {
//   DB("Database Exception:", "%s"),
//   ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//   VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//   ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//   OTHER("GroundException", "%s");
// 
//   String name;
//   String description;
// 
//   ExceptionType(String name, String description) {
//     this.name = name;
//     this.description = description;
//   }
// 
//   public String format(String... values) {
//     return String.format(this.description, values);
//   }
// }


import edu.berkeley.ground.common.exception.GroundException;
import edu.berkeley.ground.common.exception.GroundException.ExceptionType;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import play.libs.Json;
package edu.berkeley.ground.common.util;


public class ModelTestUtils {

  public static String readFromFile(String filename) throws GroundException {
    try {
      String content = new Scanner(new File(filename)).useDelimiter("\\Z").next();

      return content;
    } catch (FileNotFoundException e) {
// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public class GroundException extends Exception {
// 
//   private static final long serialVersionUID = 1L;
// 
//   private final String message;
//   private final ExceptionType exceptionType;
// 
//   public enum ExceptionType {
//     DB("Database Exception:", "%s"),
//     ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//     VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//     ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//     OTHER("GroundException", "%s");
// 
//     String name;
//     String description;
// 
//     ExceptionType(String name, String description) {
//       this.name = name;
//       this.description = description;
//     }
// 
//     public String format(String... values) {
//       return String.format(this.description, values);
//     }
//   }
// 
//   public GroundException(ExceptionType exceptionType, String... values) {
//     this.exceptionType = exceptionType;
//     this.message = this.exceptionType.format(values);
//   }
// 
//   public GroundException(Exception exception) {
//     this.exceptionType = ExceptionType.OTHER;
//     this.message = this.exceptionType.format(exception.getMessage());
//   }
// 
//   @Override
//   public String getMessage() {
//     return this.message;
//   }
// 
//   public ExceptionType getExceptionType() {
//     return this.exceptionType;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public enum ExceptionType {
//   DB("Database Exception:", "%s"),
//   ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//   VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//   ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//   OTHER("GroundException", "%s");
// 
//   String name;
//   String description;
// 
//   ExceptionType(String name, String description) {
//     this.name = name;
//     this.description = description;
//   }
// 
//   public String format(String... values) {
//     return String.format(this.description, values);
//   }
// }


// Path: modules/common/test/edu/berkeley/ground/common/util/ModelTestUtils.java
import edu.berkeley.ground.common.exception.GroundException;
import edu.berkeley.ground.common.exception.GroundException.ExceptionType;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import play.libs.Json;

package edu.berkeley.ground.common.util;


public class ModelTestUtils {

  public static String readFromFile(String filename) throws GroundException {
    try {
      String content = new Scanner(new File(filename)).useDelimiter("\\Z").next();

      return content;
    } catch (FileNotFoundException e) {
      throw new GroundException(ExceptionType.OTHER, String.format("File %s not found", filename));