GranuleSplitter { static String detectGranule(String entryName) { if (entryName.contains("GRANULE")) { Matcher matcher = TILE_PATTERN.matcher(entryName); if (matcher.matches()) { return matcher.group(1); } } return null; } private  GranuleSplitter(InputStream inputStream, File outputDir); static void main(String[] args);  }
@Test public void testDetectGranule() throws Exception { assertNull(GranuleSplitter.detectGranule(E1)); assertNull(GranuleSplitter.detectGranule(E2)); assertNotNull(GranuleSplitter.detectGranule(E3)); assertNotNull(GranuleSplitter.detectGranule(E4)); assertEquals("_T33PVP" , GranuleSplitter.detectGranule(E3)); assertEquals("_T33PVP" , GranuleSplitter.detectGranule(E4)); }