SmacUtils { public static boolean isSupportedProductType(String productType) { Guardian.assertNotNull("productType", productType); return isSupportedAatsrProductType(productType) || isSupportedMerisProductType(productType); }  static String getSensorType(String productType); static boolean isSupportedMerisProductType(String productType); static boolean isSupportedAatsrProductType(String productType); static boolean isSupportedProductType(String productType);  }
@Test public void testIsSupportedFileType() { try { SmacUtils.isSupportedProductType(null); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException ignored) { } assertTrue(SmacUtils.isSupportedProductType(EnvisatConstants.AATSR_L1B_TOA_PRODUCT_TYPE_NAME)); assertTrue(SmacUtils.isSupportedProductType(EnvisatConstants.MERIS_FR_L1B_PRODUCT_TYPE_NAME)); assertTrue(SmacUtils.isSupportedProductType(EnvisatConstants.MERIS_RR_L1B_PRODUCT_TYPE_NAME)); assertFalse(SmacUtils.isSupportedProductType("TomType")); assertFalse(SmacUtils.isSupportedProductType("NonExistingType")); }