@Test
public void testCustomBarbs() {

    // no module --> x--------
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(NaN)[kts]?vectorLength=50");
    Shape shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    String wkt = WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)).toString();
    assertEquals(wkt, "MULTILINESTRING ((0 -0, 0 50), (5 55, -5 45), (-5 55, 5 45))");
    // 2.99999999 KNOTS --> calm
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(2.999999999999)[kts]?zeroWindRadius=15");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Ellipse2D);
    assertEquals(((Ellipse2D) shp).getHeight(), ((Ellipse2D) shp).getWidth(), 1E-6); // circle
    assertEquals(((Ellipse2D) shp).getHeight(), 15, 1E-6); // 15
    assertEquals(((Ellipse2D) shp).getWidth(), 15, 1E-6); // 15
    // 3 KNOTS --> short barb
    // NORTH
    this.exp = ff
            .literal(WindBarbsFactory.WINDBARBS_PREFIX + "default(3)[kts]?vectorLength=50");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    wkt = WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)).toString();
    assertEquals(wkt, "MULTILINESTRING ((0 -0, 0 50), (0 45, 10 46.25))");
    // SOUTH make sure the same shp is flipped on y axis
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(3)[kts]?emisphere=S&vectorLength=50");
    Shape shpS = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shpS);
    assertTrue(shpS instanceof Path2D);
    shpS = WindBarbsFactory.SOUTHERN_EMISPHERE_FLIP.createTransformedShape(shpS); // flip and check
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shpS)).toString(), wkt);
    // 5 KNOTS --> short barb
    this.exp = ff
            .literal(WindBarbsFactory.WINDBARBS_PREFIX + "default(5)[kts]?vectorLength=50");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    wkt = WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)).toString();
    assertEquals(wkt, "MULTILINESTRING ((0 -0, 0 50), (0 45, 10 46.25))");
    // SOUTH make sure the same shp is flipped on y axis
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(5)[kts]?hemisphere=S&vectorLength=50");
    shpS = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shpS);
    assertTrue(shpS instanceof Path2D);
    shpS = WindBarbsFactory.SOUTHERN_EMISPHERE_FLIP.createTransformedShape(shpS); // flip and check
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shpS)).toString(), wkt);
    // 100 KNOTS --> square
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(100)[kts]?vectorLength=30");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    wkt = WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)).toString();
    assertEquals(wkt, "MULTILINESTRING ((0 -0, 0 30), (0 30, 10 30, 10 20, 0 20, 0 30))");
    // SOUTH make sure the same shp is flipped on y axis
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(100)[kts]?hemisphere=s&vectorLength=30");
    shpS = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shpS);
    assertTrue(shpS instanceof Path2D);
    shpS = WindBarbsFactory.SOUTHERN_EMISPHERE_FLIP.createTransformedShape(shpS); // flip and check
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shpS)).toString(), wkt);
    // 15 KNOTS --> square
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(15)[kts]?vectorLength=30");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)),
            "MULTILINESTRING ((0 -0, 0 30), (0 30, 20 32.5), (0 25, 10 26.25))");
    // 20 KNOTS --> 2 long feathers
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(20)[kts]?longBarbLength=50");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)),
            "MULTILINESTRING ((0 -0, 0 40), (0 40, 50 42.5), (0 35, 50 37.5))");
    // 25 KNOTS --> complex
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(25)[kts]?longBarbLength=50");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)),
            "MULTILINESTRING ((0 -0, 0 40), (0 40, 50 42.5), (0 35, 50 37.5), (0 30, 25 31.25))");
    // 50 KNOTS --> pennant
    this.exp = ff.literal(WindBarbsFactory.WINDBARBS_PREFIX
            + "default(50)[kts]?basePennantLength=10");
    shp = (Shape) wbf.getShape(null, this.exp, this.feature);
    assertNotNull(shp);
    assertTrue(shp instanceof Path2D);
    assertEquals(WindBarbsFactoryTest.WKT_WRITER.write(JTS.toGeometry(shp)),
            "MULTILINESTRING ((0 -0, 0 40), (0 40, 20 35, 0 30, 0 40))");
}