### Question:
WktRemover { public String removeWktData(String line) { String modifiedLine = line; List<String> wktTypes = New.list(WktType.POLYGON.toString().toUpperCase(), WktType.LINESTRING.toString().toUpperCase(), WktType.LINEARRING.toString().toUpperCase(), WktType.MULTIPOINT.toString().toUpperCase(), WktType.MULTILINESTRING.toString().toUpperCase(), WktType.MULTIPOLYGON.toString().toUpperCase(), WktType.GEOMETRYCOLLECTION.toString().toUpperCase()); for (String wktType : wktTypes) { if (modifiedLine.toUpperCase().contains(wktType)) { modifiedLine = modifiedLine.toUpperCase(); StringBuilder regex = new StringBuilder(); regex.append(wktType); regex.append("\\s*+\\(.*\\)"); modifiedLine = modifiedLine.replaceAll(regex.toString(), wktType); } } return modifiedLine; }  String removeWktData(String line);  }### Answer:
@Test public void testRemoveWktData() { String line = "column1, column2, POINT (( 1 )), column4"; String expected = "column1, column2, POINT (( 1 )), column4"; WktRemover remover = new WktRemover(); String actual = remover.removeWktData(line); assertEquals(expected, actual); line = "column1,column2,Polygon(( 1, 3, 5, 6, )),column4"; expected = "COLUMN1,COLUMN2,POLYGON,COLUMN4"; actual = remover.removeWktData(line); assertEquals(expected, actual); line = "column1,column2,\"LINESTRING( 1, 3, 5, 6, )\",column4"; expected = "COLUMN1,COLUMN2,\"LINESTRING\",COLUMN4"; actual = remover.removeWktData(line); assertEquals(expected, actual); line = "column1,column2,LINESTRING,column4"; expected = "COLUMN1,COLUMN2,LINESTRING,COLUMN4"; actual = remover.removeWktData(line); assertEquals(expected, actual); line = "column1,column2,column3,column4"; expected = "column1,column2,column3,column4"; actual = remover.removeWktData(line); assertEquals(expected, actual); line = "column1, column2, \"MULTILINESTRING ((22 26, 25 27, 24 28),(12 10, 13 14, 15 16),(50 51, 52 53, 54 55))\", column4"; expected = "COLUMN1, COLUMN2, \"MULTILINESTRING\", COLUMN4"; actual = remover.removeWktData(line); assertEquals(expected, actual); }