@Test public void testMERIS() { Product product = new Product("dummy", "dummy-mer_r", 2, 2); product.setProductType("MER_RR__2P"); assertEquals(Instrument.MERIS, DetectInstrument.getInstrument(product)); product.setProductType("MER_FRS_2P"); assertEquals(Instrument.MERIS, DetectInstrument.getInstrument(product)); product.setProductType("MER_RR__2P"); assertEquals(Instrument.MERIS, DetectInstrument.getInstrument(product)); product.setProductType("MER_FR__2P"); assertEquals(Instrument.MERIS, DetectInstrument.getInstrument(product)); }
private static boolean meris(Product product) { Pattern compile = Pattern.compile(MERIS_L2_TYPE_PATTER); return compile.matcher(product.getProductType()).matches(); }
DetectInstrument { private static boolean meris(Product product) { Pattern compile = Pattern.compile(MERIS_L2_TYPE_PATTER); return compile.matcher(product.getProductType()).matches(); } }
DetectInstrument { private static boolean meris(Product product) { Pattern compile = Pattern.compile(MERIS_L2_TYPE_PATTER); return compile.matcher(product.getProductType()).matches(); }  }
DetectInstrument { private static boolean meris(Product product) { Pattern compile = Pattern.compile(MERIS_L2_TYPE_PATTER); return compile.matcher(product.getProductType()).matches(); }   }
DetectInstrument { private static boolean meris(Product product) { Pattern compile = Pattern.compile(MERIS_L2_TYPE_PATTER); return compile.matcher(product.getProductType()).matches(); }    }