source: class TestThrift {
  
      private File testRootDir;
      private File idlDir;
      private File genJavaDir;
      private Thrift.Builder builder;
  
      @Test
      public void testBadCompile() throws Exception {
  
target:         final File thriftFile = new File(testRootDir, "missing.thrift");
          builder.addThriftPathElement(testRootDir);
  
          // Hacking around checks in addThrift file.
          assertTrue(thriftFile.createNewFile());
          builder.addThriftFile(thriftFile);
          assertTrue(thriftFile.delete());
  
          final Thrift thrift = builder.build();
  
          assertTrue(!thriftFile.exists());
          assertFalse("gen-java directory should not exist", genJavaDir.exists());
  
          // execute the compile
          final int result = thrift.compile();
          assertEquals(1, result);
      }
  
  }