@@ -0,0 +1,2220 @@
+package com.aventstack.extentreports.reporter;%0A%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.Test;%0A%0Aimport com.aventstack.extentreports.ExtentReports;%0Aimport com.aventstack.extentreports.Status;%0A%0Apublic class SparkReporterFilterTest %7B%0A%0A    @Test%0A    public void singleStatusFilterTestAllFiltered() %7B%0A        ExtentReports extent = new ExtentReports();%0A        ExtentSparkReporter spark = new ExtentSparkReporter(%22target/spark.html%22);%0A        spark.filter()%0A                .statusFilter()%0A                .as(new Status%5B%5D%7BStatus.FAIL%7D)%0A                .apply();%0A        extent.attachReporter(spark);%0A        extent.createTest(%22Test%22).pass(%22Pass%22);%0A        extent.flush();%0A        Assert.assertEquals(spark.getReport().getTestList().size(), 0);%0A    %7D%0A%0A    @Test%0A    public void singleStatusFilterTestOneFiltered() %7B%0A        ExtentReports extent = new ExtentReports();%0A        ExtentSparkReporter spark = new ExtentSparkReporter(%22target/spark.html%22);%0A        spark.filter()%0A                .statusFilter()%0A                .as(new Status%5B%5D%7BStatus.FAIL%7D)%0A                .apply();%0A        extent.attachReporter(spark);%0A        extent.createTest(%22Test1%22).pass(%22Pass%22);%0A        extent.createTest(%22Test2%22).fail(%22Fail%22);%0A        extent.flush();%0A        Assert.assertEquals(spark.getReport().getTestList().size(), 1);%0A        Assert.assertEquals(spark.getReport().getTestList().get(0).getName(), %22Test2%22);%0A    %7D%0A%0A    @Test%0A    public void singleStatusFilterTestSomeFiltered() %7B%0A        ExtentReports extent = new ExtentReports();%0A        ExtentSparkReporter spark = new ExtentSparkReporter(%22target/spark.html%22);%0A        spark.filter()%0A                .statusFilter()%0A                .as(new Status%5B%5D%7BStatus.FAIL, Status.SKIP%7D)%0A                .apply();%0A        extent.attachReporter(spark);%0A        extent.createTest(%22Test1%22).pass(%22Pass%22);%0A        extent.createTest(%22Test2%22).fail(%22Fail%22);%0A        extent.createTest(%22Test3%22).skip(%22Skip%22);%0A        extent.flush();%0A        Assert.assertEquals(spark.getReport().getTestList().size(), 2);%0A        Assert.assertEquals(spark.getReport().getTestList().get(0).getName(), %22Test2%22);%0A        Assert.assertEquals(spark.getReport().getTestList().get(1).getName(), %22Test3%22);%0A    %7D%0A%7D%0A

Create SparkReporterFilterTest.java