@SuppressWarnings("unchecked")
  public synchronized T load(File jsonFile)
      throws IOException, JsonParseException, JsonMappingException {
    if (!jsonFile.exists()) {
      throw new FileNotFoundException("No such file: " + jsonFile);
    }
    if (!jsonFile.isFile()) {
      throw new FileNotFoundException("Not a file: " + jsonFile);
    }
    if (jsonFile.length() == 0) {
      throw new EOFException("File is empty: " + jsonFile);
    }
    try {
      return mapper.readValue(jsonFile, classType);
    } catch (IOException e) {
      LOG.warn("Exception while parsing json file {}", jsonFile, e);
      throw e;
    }
  }
@Test
  public void testFileSystemEmptyStatus() throws Throwable {
    File tempFile = File.createTempFile("Keyval", ".json");
    Path tempPath = new Path(tempFile.toURI());
    LocalFileSystem fs = FileSystem.getLocal(new Configuration());
    try {
      final FileStatus st = fs.getFileStatus(tempPath);
      LambdaTestUtils.intercept(EOFException.class,
          () -> serDeser.load(fs, tempPath, st));
    } finally {
      fs.delete(tempPath, false);
    }
  }