@Override
    public NvdApiProcessor call() throws Exception {
        if (jsonFile.getName().endsWith(".jsonarray.gz")) {
            try (InputStream fis = Files.newInputStream(jsonFile.toPath());
                 InputStream is = new BufferedInputStream(new GZIPInputStream(fis));
                 CveItemSource<DefCveItem> itemSource = new JsonArrayCveItemSource(is)) {
                updateCveDb(itemSource);
            }
        } else if (jsonFile.getName().endsWith(".gz")) {
            try (InputStream fis = Files.newInputStream(jsonFile.toPath());
                 InputStream is = new BufferedInputStream(new GZIPInputStream(fis));
                 CveItemSource<DefCveItem> itemSource = new CveApiJson20CveItemSource(is)) {
                updateCveDb(itemSource);
            }
        } else {
            try (InputStream fis = Files.newInputStream(jsonFile.toPath());
                 InputStream is = new BufferedInputStream(fis);
                 CveItemSource<DefCveItem> itemSource = new JsonArrayCveItemSource(is)) {
                updateCveDb(itemSource);
            }
        }
        endTime = System.currentTimeMillis();
        return this;
    }
@Test
    public void unspecifiedFileName() throws Exception {
        try (CveDB cve = new CveDB(getSettings())) {
            File file = File.createTempFile("test", "test");
            writeFileString(file, "");
            NvdApiProcessor processor = new NvdApiProcessor(null, file);
            processor.call();
        }
    }