@Test
public void testHtmlProcessorStringifyExpression() {

    PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class);
    processor = new HtmlProcessor(temp, mockPolicySetType);
    RuleType mockRuleType = Mockito.mock(RuleType.class);
    ConditionType mockConditionType = Mockito.mock(ConditionType.class);
    JAXBElement<?> mockJAXBElement = Mockito.mock(JAXBElement.class);
    EffectType effectTypePermit = EffectType.PERMIT;
    Object mockExpressObject = Mockito.mock(Object.class);
    AttributeDesignatorType mockAttrDesType = Mockito.mock(AttributeDesignatorType.class);
    AttributeSelectorType mockAttrSelType = Mockito.mock(AttributeSelectorType.class);
    AttributeValueType mockAttrValType = Mockito.mock(AttributeValueType.class);
    VariableReferenceType mockVarRefType = Mockito.mock(VariableReferenceType.class);
    Object mockContentObject = Mockito.mock(Object.class);
    List<Object> contentList = new ArrayList<Object>();
    contentList.add(mockContentObject);
    when(mockRuleType.getEffect()).thenReturn(effectTypePermit);
    when(mockRuleType.getCondition()).thenReturn(mockConditionType);
    doReturn(mockJAXBElement).when(mockConditionType).getExpression();
    doReturn(mockExpressObject).when(mockJAXBElement).getValue();
    try {
        processor.rule(mockRuleType);
        fail();
    } catch (IllegalArgumentException e) {
        verify(mockRuleType, atLeast(1)).getEffect();
        verify(mockRuleType, atLeast(1)).getCondition();
        verify(mockConditionType, atLeast(1)).getExpression();
        verify(mockJAXBElement, atLeast(1)).getValue();
    }
    doReturn(mockAttrDesType).when(mockJAXBElement).getValue();
    when(mockAttrDesType.getCategory()).thenReturn("");
    when(mockAttrDesType.getAttributeId()).thenReturn("");
    when(mockAttrDesType.getDataType()).thenReturn("");
    processor.rule(mockRuleType);
    verify(mockJAXBElement, atLeast(1)).getValue();
    verify(mockAttrDesType, atLeast(1)).getCategory();
    verify(mockAttrDesType, atLeast(1)).getAttributeId();
    verify(mockAttrDesType, atLeast(1)).getDataType();
    doReturn(mockAttrSelType).when(mockJAXBElement).getValue();
    when(mockAttrSelType.getPath()).thenReturn("SamplePath/text()");
    processor.rule(mockRuleType);
    verify(mockJAXBElement, atLeast(1)).getValue();
    verify(mockAttrSelType, atLeast(1)).getPath();
    when(mockAttrSelType.getPath()).thenReturn("");
    processor.rule(mockRuleType);
    verify(mockJAXBElement, atLeast(1)).getValue();
    verify(mockAttrSelType, atLeast(1)).getPath();
    doReturn(mockAttrValType).when(mockJAXBElement).getValue();
    when(mockAttrValType.getContent()).thenReturn(contentList);
    processor.rule(mockRuleType);
    verify(mockJAXBElement, atLeast(1)).getValue();
    verify(mockAttrValType, atLeast(1)).getContent();
    doReturn(mockVarRefType).when(mockJAXBElement).getValue();
    processor.rule(mockRuleType);
    verify(mockJAXBElement, atLeast(1)).getValue();
}