// Path: src/main/java/com/indoqa/solr/spatial/corridor/wkt/WktUtils.java
// public class WktUtils {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(WktUtils.class);
// 
//     private static final GeometryFactory geometryFactory = new GeometryFactory();
// 
//     public static LineString parseLineString(String corridorLineString) {
//         String rawCoordinates = StringUtils.substringBetween(corridorLineString, "LINESTRING(", ")");
//         if (rawCoordinates == null || rawCoordinates.trim().isEmpty()) {
//             LOGGER.warn("Linestring without coordinates found: '{}'", corridorLineString);
//             return geometryFactory.createLineString((Coordinate[]) null);
//         }
//         String[] coordinates = rawCoordinates.trim().split(",");
// 
//         Coordinate[] wktCoordinates = Arrays.stream(coordinates).map(WktUtils::createCoordinate).toArray(Coordinate[]::new);
//         return geometryFactory.createLineString(wktCoordinates);
//     }
// 
//     public static Point parsePoint(String pointString) {
//         String rawPoints = StringUtils.substringBetween(pointString, "POINT(", ")");
//         if (rawPoints == null) {
//             throw new IllegalArgumentException("Parameter must be a valid WKT Point!");
//         }
// 
//         Coordinate coordinate = createCoordinate(rawPoints);
//         return geometryFactory.createPoint(coordinate);
//     }
// 
//     private static Coordinate createCoordinate(String rawCoordinates) {
//         String[] points = rawCoordinates.trim().split(" ");
// 
//         Coordinate coordinate = new Coordinate();
//         coordinate.x = Double.parseDouble(points[0]);
//         coordinate.y = Double.parseDouble(points[1]);
//         geometryFactory.getPrecisionModel().makePrecise(coordinate);
//         return coordinate;
//     }
// }


import com.indoqa.solr.spatial.corridor.wkt.WktUtils;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrInputDocument;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
/*
 * Licensed to the Indoqa Software Design und Beratung GmbH (Indoqa) under
 * one or more contributor license agreements. See the NOTICE file distributed
 * with this work for additional information regarding copyright ownership.
 * Indoqa licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.indoqa.solr.spatial.corridor;




public class TestWktUtils {

    @Test
    public void testEmptyLinestring() throws SolrServerException, IOException {
// Path: src/main/java/com/indoqa/solr/spatial/corridor/wkt/WktUtils.java
// public class WktUtils {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(WktUtils.class);
// 
//     private static final GeometryFactory geometryFactory = new GeometryFactory();
// 
//     public static LineString parseLineString(String corridorLineString) {
//         String rawCoordinates = StringUtils.substringBetween(corridorLineString, "LINESTRING(", ")");
//         if (rawCoordinates == null || rawCoordinates.trim().isEmpty()) {
//             LOGGER.warn("Linestring without coordinates found: '{}'", corridorLineString);
//             return geometryFactory.createLineString((Coordinate[]) null);
//         }
//         String[] coordinates = rawCoordinates.trim().split(",");
// 
//         Coordinate[] wktCoordinates = Arrays.stream(coordinates).map(WktUtils::createCoordinate).toArray(Coordinate[]::new);
//         return geometryFactory.createLineString(wktCoordinates);
//     }
// 
//     public static Point parsePoint(String pointString) {
//         String rawPoints = StringUtils.substringBetween(pointString, "POINT(", ")");
//         if (rawPoints == null) {
//             throw new IllegalArgumentException("Parameter must be a valid WKT Point!");
//         }
// 
//         Coordinate coordinate = createCoordinate(rawPoints);
//         return geometryFactory.createPoint(coordinate);
//     }
// 
//     private static Coordinate createCoordinate(String rawCoordinates) {
//         String[] points = rawCoordinates.trim().split(" ");
// 
//         Coordinate coordinate = new Coordinate();
//         coordinate.x = Double.parseDouble(points[0]);
//         coordinate.y = Double.parseDouble(points[1]);
//         geometryFactory.getPrecisionModel().makePrecise(coordinate);
//         return coordinate;
//     }
// }


// Path: src/test/java/com/indoqa/solr/spatial/corridor/TestWktUtils.java
import com.indoqa.solr.spatial.corridor.wkt.WktUtils;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrInputDocument;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;

/*
 * Licensed to the Indoqa Software Design und Beratung GmbH (Indoqa) under
 * one or more contributor license agreements. See the NOTICE file distributed
 * with this work for additional information regarding copyright ownership.
 * Indoqa licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.indoqa.solr.spatial.corridor;




public class TestWktUtils {

    @Test
    public void testEmptyLinestring() throws SolrServerException, IOException {
        WktUtils.parseLineString("LINESTRING()");