RARegions { static String removeMetadataFromWkt(String originalWKT) { return originalWKT.replaceAll(",\\s*METADATA\\s*\\[[^\\]]+\\]", ""); }  static FeatureCollection<SimpleFeatureType, SimpleFeature> openShapefile(Path path, File tempDir, Configuration conf); static String[][] loadStringAttributes(String shapeFilePath, Configuration conf); static void main(String[] args);  }
@Test public void test_removeMetadataFromWkt() throws Exception { assertEquals(WKT1, RARegions.removeMetadataFromWkt(WKT1)); assertEquals(WKT2b, RARegions.removeMetadataFromWkt(WKT2a)); }