LandsatGeotiffReaderPlugin implements ProductReaderPlugIn { static boolean isLandsatMSSFilename(String filename) { return filename.matches("LM[1-5]\\d{13}\\w{3}\\d{2}_MTL.(txt|TXT)"); }  @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();  }
@Test public void testIsLandsatMSSFilename() throws Exception { assertTrue(LandsatGeotiffReaderPlugin.isLandsatMSSFilename("LM11870291976166ESA00_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsatMSSFilename("LM32170241982254XXX01_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsatMSSFilename("LM42310081982267ESA00_MTL.txt")); assertTrue(LandsatGeotiffReaderPlugin.isLandsatMSSFilename("LM52010241984295AAA03_MTL.txt")); assertFalse(LandsatGeotiffReaderPlugin.isLandsatMSSFilename("LT40140341983030XXX13_MTL.txt")); }