public virtual void TestAppliedClipPathRenderer()
        {
            AbstractBranchSvgNodeRenderer clipPathRenderer = new ClipPathSvgNodeRenderer();

            clipPathRenderer.SetAttribute(SvgConstants.Attributes.ID, "randomString");
            ISvgNodeRenderer clippedRenderer = new RectangleSvgNodeRenderer();

            clippedRenderer.SetAttribute(SvgConstants.Attributes.WIDTH, "80");
            clippedRenderer.SetAttribute(SvgConstants.Attributes.HEIGHT, "80");
            clipPathRenderer.AddChild(clippedRenderer);
            sdc.AddNamedObject("randomString", clipPathRenderer);
            ISvgNodeRenderer drawnRenderer = new CircleSvgNodeRenderer();

            drawnRenderer.SetAttribute(SvgConstants.Attributes.R, "84");
            drawnRenderer.SetAttribute(SvgConstants.Attributes.CLIP_PATH, "url(#randomString)");
            drawnRenderer.Draw(sdc);
            String expected = "q\n" + "% rect\n" + "0 0 60 60 re\n" + "W\n" + "n\n" + "0 0 0 rg\n" + "% ellipse\n" + "63 0 m\n"
                              + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
                              + "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "Q\n";

            NUnit.Framework.Assert.AreEqual(expected, iText.IO.Util.JavaUtil.GetStringForBytes(cv.GetContentStream().GetBytes
                                                                                                   ()));
        }