### Question:
GeomBuilder { public GeomBuilder lineString() { gstack.push(factory.createLineString(cpopAll())); return this; } GeomBuilder();  GeomBuilder(GeometryFactory factory);  GeomBuilder(int srid); GeomBuilder point(double x, double y); GeomBuilder pointz(double x, double y, double z); GeomBuilder points(double ...ord); GeomBuilder pointsz(double ...ord); GeomBuilder point(); GeomBuilder lineString(); GeomBuilder ring(); GeomBuilder polygon(); GeomBuilder multiPoint(); GeomBuilder multiLineString(); GeomBuilder multiPolygon(); GeomBuilder collection(); GeomBuilder buffer(double amt); Geometry get(); Point toPoint(); LineString toLineString(); LinearRing toLinearRing(); Polygon toPolygon(); MultiPoint toMultiPoint(); MultiLineString toMultiLineString(); MultiPolygon toMultiPolygon(); GeometryCollection toCollection();  }### Answer:
@Test public void testLineString() { LineString l = gb.point(1,2).point(3,4).toLineString(); assertEquals(2, l.getNumPoints()); assertPoint(l.getPointN(0), 1,2); assertPoint(l.getPointN(1), 3,4); }