@Test
public void testSample10File() throws URISyntaxException, NoSuchAuthorityCodeException, ServiceException, FactoryException {

    File file = new File(getClass().getResource("sample_10.gpx").toURI());
    GPXParser parser = new GPXParser();
    SimpleFeatureCollection fc = parser.parse(file, null, CRS.decode("EPSG:3067", true));
    assertEquals(1, fc.size());
    SimpleFeatureIterator it = fc.features();
    try {
        SimpleFeature f = it.next();
        assertEquals("trk name", f.getAttribute("name"));
        MultiLineString mls = (MultiLineString) f.getDefaultGeometry();
        assertEquals(1, mls.getNumGeometries());
        LineString ls = (LineString) mls.getGeometryN(0);
        assertEquals(4, ls.getNumPoints());
        Coordinate c;
        c = ls.getCoordinateN(0);
        assertEquals(500000, c.x, 1e-7);
        assertEquals(6751648.982188291, c.y, 1e-7);
        assertEquals(135.0, c.z, 0.0);
        c = ls.getCoordinateN(1);
        assertEquals(500000, c.x, 1e-7);
        assertEquals(6863040.132332872, c.y, 1e-7);
        assertEquals(135.0, c.z, 0.0);
        c = ls.getCoordinateN(2);
        assertEquals(500000, c.x, 1e-7);
        assertEquals(6974447.589629403, c.y, 1e-7);
        assertEquals(135.0, c.z, 0.0);
        c = ls.getCoordinateN(3);
        assertEquals(500000, c.x, 1e-7);
        assertEquals(7085870.966995355, c.y, 1e-7);
        assertEquals(152.0, c.z, 0.0);
    } finally {
        it.close();
    }
}