@Test
public void generateArrowHeadFeatureCollection() throws InvalidArrowLineConfigException {

    ArrayList<Point> pointsList = new ArrayList<>();
    
    pointsList.add(Point.fromLngLat(9.1d, 9.1d));
    pointsList.add(Point.fromLngLat(11.1d, 9.1d));
    pointsList.add(Point.fromLngLat(11.1d, 2.1d));
    pointsList.add(Point.fromLngLat(9.1d, 2.1d));
    LineString lineString = LineString.fromLngLats(pointsList);
    ArrowLineLayer.FeatureConfig featureConfig = new ArrowLineLayer.FeatureConfig(
            FeatureCollection.fromFeature(Feature.fromGeometry(lineString))
    );
    ArrowLineLayer.SortConfig sortConfig = new ArrowLineLayer.SortConfig("", ArrowLineLayer.SortConfig.SortOrder.DESC, ArrowLineLayer.SortConfig.PropertyType.NUMBER);
    ArrowLineLayer.Builder builder = new ArrowLineLayer.Builder(context, featureConfig, sortConfig);
    ArrowLineLayer arrowLineLayer = builder.build();
    FeatureCollection arrowHeadFeatureCollection = ReflectionHelpers.callInstanceMethod(arrowLineLayer
            , "generateArrowHeadFeatureCollection"
            , ReflectionHelpers.ClassParameter.from(LineString.class, lineString)
    );
    assertEquals(3, arrowHeadFeatureCollection.features().size());
    Feature arrowHeadFeature = arrowHeadFeatureCollection.features().get(0);
    assertTrue(arrowHeadFeature.hasProperty("arrow-head-bearing"));
    assertTrue(arrowHeadFeature.hasNonNullValueForProperty("arrow-head-bearing"));
    Point expectedPoint = Point.fromLngLat(10.1d, 9.101363d);
    Point actual = (Point) arrowHeadFeatureCollection.features().get(0).geometry();
    assertEquals(expectedPoint.latitude(), actual.latitude(), 0.0000001d);
    assertEquals(expectedPoint.longitude(), actual.longitude(), 0d);
}