@Test
public void testLinestringOnePoint() throws Exception {

    URL u = TestData.url(TestCaseSupport.class, "lsOnePoint/lsOnePoint.shp");
    File f = DataUtilities.urlToFile(u);
    assertTrue(f.exists());
    store = new ShapefileDataStore(u);
    SimpleFeatureSource fs = store.getFeatureSource(store.getTypeNames()[0]);
    SimpleFeatureCollection fc = fs.getFeatures();
    assertEquals(3, fc.size());
    int i = 418;
    SimpleFeatureIterator it = fc.features();
    while (it.hasNext()) {
        SimpleFeature sf = it.next();
        assertEquals("Activity" + i, sf.getAttribute("Name"));
        if (i == 419) {
            assertNotNull(sf.getDefaultGeometry());
            assertTrue(sf.getDefaultGeometry() instanceof MultiLineString);
            MultiLineString mls = (MultiLineString) sf.getDefaultGeometry();
            assertEquals(1, mls.getNumGeometries());
            LineString ls = (LineString) mls.getGeometryN(0);
            assertEquals(2, ls.getNumPoints());
            assertEquals(ls.getStartPoint(), ls.getEndPoint());
        }
        i++;
    }
    it.close();
    assertEquals(421, i);
    assertEquals(3, fc.toArray().length);
}