@Test
public void pointFeaturesInBufferZoneWontBeRemoved() throws Exception {

    Coordinate[] ca = new Coordinate[5];
    ca[0] = new Coordinate(-50, -50);
    ca[1] = new Coordinate(150, -50);
    ca[2] = new Coordinate(150, 150);
    ca[3] = new Coordinate(-50, 150);
    ca[4] = new Coordinate(-50, -50);
    GeometryFactory gf = new GeometryFactory();
    List<Point> points = Arrays.stream(ca)
            .map(c -> gf.createPoint(c))
            .collect(Collectors.toList());
    double[] bbox = { 0, 0, 100, 100 };
    double[] largerBbox = { 0, 0, 4096, 4096 };
    SimpleFeatureTypeBuilder tBuilder = new SimpleFeatureTypeBuilder();
    tBuilder.setName("test");
    tBuilder.add("geom", Point.class);
    SimpleFeatureType featureType = tBuilder.buildFeatureType();
    DefaultFeatureCollection fc = new DefaultFeatureCollection("test", featureType);
    SimpleFeatureBuilder fBuilder = new SimpleFeatureBuilder(featureType);
    for (Point point : points) {
        fBuilder.set("geom", point);
        fc.add(fBuilder.buildFeature(null));
    }
    assertEquals(5, fc.size());
    List<Geometry> inTile = SimpleFeaturesMVTEncoder.asMVTGeoms(fc, bbox, 4096, 256);
    assertEquals(0, inTile.size());
    List<Geometry> inLargeTile = SimpleFeaturesMVTEncoder.asMVTGeoms(fc, largerBbox, 4096, 256);
    assertEquals(5, inLargeTile.size());
    List<Geometry> inLargeTileNoBuffer = SimpleFeaturesMVTEncoder.asMVTGeoms(fc, largerBbox, 4096, 0);
    assertEquals(1, inLargeTileNoBuffer.size());
}