private TernDoc createDocForCompletionModuleCheckFiles() {
    TernDoc doc = new TernDoc();

    TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(AngularType.module);
    query.setExpression("");

    doc.setQuery(query);
    return doc;
  }
  private TernDoc createDocForDefinitionTodoText() {
    TernDoc doc = createFile();

    TernAngularDefinitionQuery query = new TernAngularDefinitionQuery(AngularType.model);
    query.addFile("myfile.js");
    query.getScope().getControllers().add("TodoCtrl");
    query.setExpression("todoText");

    doc.setQuery(query);
    return doc;
  }
  private TernDoc createDocForDefinitionWithModule() {
    TernDoc doc = createFileWithModule();

    TernAngularDefinitionQuery query = new TernAngularDefinitionQuery(AngularType.model);
    query.addFile("myfile.js");
    query.getScope().setModule("MyApp");
    query.getScope().getControllers().add("SomeCtrl");
    query.setExpression("save");
    query.setEnd(1);
    doc.setQuery(query);
    return doc;
  }
  private TernDoc createDocForCompletionModuleStartsWith() {
    String name = "myfile.js";
    String text = "angular.module('phonecatApp');" + "angular.module('phonecatAnimations');";

    TernDoc doc = new TernDoc();
    doc.addFile(name, text, null, null);

    TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(AngularType.module);
    query.setExpression("phonecatAn");

    doc.setQuery(query);
    return doc;
  }