### Question:
ImportFileUtils { public Reader getReader(File file) throws ImportException { try { InputStream inputStream = new FileInputStream(file); if (GzipUtils.isCompressedFilename(file.getName())) { inputStream = new GZIPInputStream(inputStream); } else if (FilenameUtils.getExtension(file.getName()).equals("zip")) { inputStream = new ZipInputStream(inputStream); ((ZipInputStream)inputStream).getNextEntry(); } return new InputStreamReader(inputStream, fileCharset); } catch (Exception e) { throw new ImportException(e); } }  Collection<File> listImportFiles(String importDir); Reader getReader(File file); void setEligibleFileExtensions(String[] eligibleFileExtensions); void setFileCharset(String fileCharset);  }### Answer:
@Test public void getReader_JsonContent() throws ImportException, IOException { try(Reader reader = importFileUtils.getReader(importFileJson)) { String readContent = IOUtils.toString(reader); assertEquals(importFileJsonContent, readContent); } }
@Test public void getReader_GzContent() throws ImportException, IOException { try(Reader reader = importFileUtils.getReader(importFileJsonGz)) { String readContent = IOUtils.toString(reader); assertEquals(importFileJsonGzContent, readContent); } }
@Test public void getReader_ZipContent() throws ImportException, IOException { try(Reader reader = importFileUtils.getReader(importFileZip)) { String readContent = IOUtils.toString(reader); assertEquals(importFileZipContent, readContent); } }