@@ -0,0 +1,1697 @@
+package com.aventstack.extentreports;%0A%0Aimport java.util.Set;%0Aimport java.util.stream.Collectors;%0A%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.Test;%0A%0Apublic class ExtentTestAttributesHierarchyTest %7B%0A%0A    @Test%0A    public void checkTagHierarchy() %7B%0A        ExtentReports extent = new ExtentReports();%0A        ExtentTest t = extent.createTest(%22Test%22)%0A                .assignCategory(%22Tag1%22)%0A                .createNode(%22Level1%22)%0A                .assignCategory(%22Tag2%22)%0A                .createNode(%22Level2%22)%0A                .assignCategory(%22Tag3%22);%0A        Set%3CString%3E parentTags = t.getModel().getParent().getParent().getCategorySet()%0A                .stream()%0A                .map(x -%3E x.getName())%0A                .collect(Collectors.toSet());%0A        Set%3CString%3E childTags = t.getModel().getParent().getCategorySet()%0A                .stream()%0A                .map(x -%3E x.getName())%0A                .collect(Collectors.toSet());%0A        Set%3CString%3E grandchildTags = t.getModel().getCategorySet()%0A                .stream()%0A                .map(x -%3E x.getName())%0A                .collect(Collectors.toSet());%0A        // grandchild, assigned to self%0A        Assert.assertTrue(grandchildTags.contains(%22Tag3%22));%0A        // grandchild, from parent %5BLevel2%5D%0A        Assert.assertTrue(grandchildTags.contains(%22Tag2%22));%0A        // grandchild, from ancestor %5BLevel1%5D%0A        Assert.assertTrue(grandchildTags.contains(%22Tag1%22));%0A        // child, assigned to self%0A        Assert.assertTrue(childTags.contains(%22Tag2%22));%0A        // child, propagated from parent%0A        Assert.assertTrue(childTags.contains(%22Tag1%22));%0A        // parent%0A        Assert.assertTrue(parentTags.contains(%22Tag1%22));%0A    %7D%0A%0A%7D%0A

Create ExtentTestAttributesHierarchyTest.java