private LocatedFileStatus createLocatedStatus(MockFile file) throws IOException {
      FileStatus fileStatus = createStatus(file);
      if (file.isHdfsHflushed) {
        // Should work the same way as the local status except for having isUnderConstruction flag set to true and
        // having HdfsLocatedFileStatus type
        LocatedBlocks lb = new LocatedBlocks(fileStatus.getLen(), true, null, null, false, null, null);
        HdfsLocatedFileStatus mockStatus = mock(HdfsLocatedFileStatus.class);
        when(mockStatus.getLocatedBlocks()).thenReturn(lb);
        when(mockStatus.getPath()).thenReturn(fileStatus.getPath());
        when(mockStatus.getLen()).thenReturn(fileStatus.getLen());
        when(mockStatus.isDirectory()).thenReturn(false);
        when(mockStatus.isFile()).thenReturn(true);
        when(mockStatus.getBlockSize()).thenReturn(fileStatus.getBlockSize());
        when(mockStatus.getBlockLocations()).thenReturn(getFileBlockLocationsImpl(fileStatus, 0, fileStatus.getLen(),
            false));
        return mockStatus;
      } else {
        return new LocatedFileStatus(fileStatus, getFileBlockLocationsImpl(fileStatus, 0, fileStatus.getLen(), false));
      }
    }
WARNING: detele(Path...) don't actually delete
ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java