### Question:
LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { public static VirtualDir getInput(Object input) throws IOException { File inputFile = getFileInput(input); if (inputFile.isFile() && !isCompressedFile(inputFile)) { final File absoluteFile = inputFile.getAbsoluteFile(); inputFile = absoluteFile.getParentFile(); if (inputFile == null) { throw new IOException("Unable to retrieve parent to file: " + absoluteFile.getAbsolutePath()); } } VirtualDir virtualDir = VirtualDir.create(inputFile); if (virtualDir == null) { virtualDir = new VirtualDirTgz(inputFile); } return virtualDir; }  @Override DecodeQualification getDecodeQualification(Object input); @Override Class[] getInputTypes(); @Override ProductReader createReaderInstance(); @Override String[] getFormatNames(); @Override String[] getDefaultFileExtensions(); @Override String getDescription(Locale locale); @Override BeamFileFilter getProductFileFilter(); static VirtualDir getInput(Object input);  }### Answer:
@Test public void testGetInput_Directory_File() throws IOException { final File testDirectory = TestUtil.getTestDirectory("tgz"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testDirectory); assertNotNull(input); assertEquals(testDirectory.getPath(), input.getBasePath()); }
@Test public void testGetInput_Directory_String() throws IOException { final File testDirectory = TestUtil.getTestDirectory("tgz"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testDirectory.getPath()); assertNotNull(input); assertEquals(testDirectory.getPath(), input.getBasePath()); }
@Test public void testGetInput_File_File() throws IOException { final File testFile = TestUtil.getTestFile("geotiff/test_MTL.txt"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testFile); assertNotNull(input); assertEquals(testFile.getAbsoluteFile().getParentFile().getPath(), input.getBasePath()); }
@Test public void testGetInput_File_String() throws IOException { final File testFile = TestUtil.getTestFile("geotiff/test_MTL.txt"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testFile.getPath()); assertNotNull(input); assertEquals(testFile.getAbsoluteFile().getParentFile().getPath(), input.getBasePath()); }
@Test public void testGetInput_Zip_File() throws IOException { final File testFile = TestUtil.getTestFile("zip/test-archive.zip"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testFile); assertNotNull(input); assertEquals(testFile.getPath(), input.getBasePath()); }
@Test public void testGetInput_Tar_File() throws IOException { final File testFile = TestUtil.getTestFile("tgz/test-archive.tar"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testFile); assertNotNull(input); assertEquals(testFile.getPath(), input.getBasePath()); }
@Test public void testGetInput_Tgz_File() throws IOException { final File testFile = TestUtil.getTestFile("tgz/test-archive.tgz"); final VirtualDir input = LandsatGeotiffReaderPlugin.getInput(testFile); assertNotNull(input); assertEquals(testFile.getPath(), input.getBasePath()); }