@Test
  public void noCompletionWithModule() throws TernException {
    TernDoc doc = createDocForNoCompletionModule();
    MockTernCompletionCollector collector = new MockTernCompletionCollector();
    server.request(doc, collector);

    Assert.assertTrue(collector.getCompletions().size() == 0);
  }
  @Test
  public void completionWithModuleStartsWith() throws TernException {
    TernDoc doc = createDocForCompletionModuleStartsWith();
    MockTernCompletionCollector collector = new MockTernCompletionCollector();
    server.request(doc, collector);

    Assert.assertTrue(collector.getCompletions().size() == 1);
    TernCompletionItem item = collector.get("phonecatAnimations");
    Assert.assertNotNull(item);
    Assert.assertEquals("phonecatAnimations", item.getName());
    Assert.assertEquals("Module", item.getType());
    Assert.assertEquals("myfile.js", item.getOrigin());
  }