    @Test
    public void andExpressionTest() {

        PdfDocument tempDoc = new PdfDocument(new PdfWriter(new ByteArrayOutputStream()));

        // create expression with the AND operator as the first parameter
        PdfVisibilityExpression expression = new PdfVisibilityExpression(PdfName.And);

        // add two empty dictionaries as the other parameters
        expression.addOperand(new PdfLayer((PdfDictionary) new PdfDictionary().makeIndirect(tempDoc)));
        expression.addOperand(new PdfLayer((PdfDictionary) new PdfDictionary().makeIndirect(tempDoc)));

        PdfObject expressionObject = expression.getPdfObject();
        Assert.assertTrue(expressionObject instanceof PdfArray);
        Assert.assertEquals(3, ((PdfArray) expressionObject).size());
        Assert.assertEquals(PdfName.And, ((PdfArray) expressionObject).getAsName(0));
    }