### Question:
IRODSFileInputStream extends InputStream { @Override public void close() throws IOException { log.info("closing file stream and file"); try { irodsFile.close(); } catch (JargonException e) { log.error("JargonException in operation, rethrown as IOException for contract", e); throw new IOException(e); } filePointer = 0L; } protected  IRODSFileInputStream(final IRODSFile irodsFile, final FileIOOperations fileIOOperations); protected  IRODSFileInputStream(final IRODSFile irodsFile, final FileIOOperations fileIOOperations, final int fd); @Override int read(); @Override int read(final byte b[], final int off, final int len); @Override int read(final byte b[]); @Override long skip(final long numberOfBytesToSkip); @Override int available(); long availableAsLong(); @Override void close();  }### Answer:
@Test public final void testClose() throws Exception { String testFileName = "testClose.txt"; int fileLength = 1; String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); org.irods.jargon.testutils.filemanip.FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, fileLength); String targetIrodsCollection = testingPropertiesHelper .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); StringBuilder fileNameAndPath = new StringBuilder(); fileNameAndPath.append(absPath); fileNameAndPath.append(testFileName); IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); DataTransferOperations dto = accessObjectFactory.getDataTransferOperations(irodsAccount); dto.putOperation(fileNameAndPath.toString(), targetIrodsCollection, testingProperties.getProperty(TestingPropertiesHelper.IRODS_RESOURCE_KEY), null, null); IRODSFileFactory irodsFileFactory = accessObjectFactory.getIRODSFileFactory(irodsAccount); IRODSFile irodsFile = irodsFileFactory.instanceIRODSFile(targetIrodsCollection, testFileName); IRODSFileInputStream fis = irodsFileFactory.instanceIRODSFileInputStream(irodsFile); fis.close(); Assert.assertTrue(true); }