@Test
public void testHtmlProcessorRule() {

    PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class);
    RuleType mockRuleType = Mockito.mock(RuleType.class);
    ConditionType mockConditionType = Mockito.mock(ConditionType.class);
    ObligationExpressionsType mockOESType = Mockito.mock(ObligationExpressionsType.class);
    ObligationExpressionType mockOEType = Mockito.mock(ObligationExpressionType.class);
    EffectType effectTypePermit = EffectType.PERMIT;
    processor = new HtmlProcessor(temp, mockPolicySetType);
    List<ObligationExpressionType> oblList = new ArrayList<ObligationExpressionType>();
    oblList.add(mockOEType);
    when(mockRuleType.getEffect()).thenReturn(effectTypePermit);
    when(mockRuleType.getRuleId()).thenReturn(null);
    when(mockRuleType.getTarget()).thenReturn(null);
    when(mockRuleType.getCondition()).thenReturn(mockConditionType);
    when(mockRuleType.getObligationExpressions()).thenReturn(mockOESType);
    when(mockOESType.getObligationExpression()).thenReturn(oblList);
    when(mockOEType.getFulfillOn()).thenReturn(effectTypePermit);
    processor.rule(mockRuleType);
    verify(mockRuleType, atLeast(1)).getRuleId();
    verify(mockRuleType, atLeast(1)).getTarget();
    verify(mockRuleType, atLeast(1)).getCondition();
    verify(mockRuleType, atLeast(1)).getObligationExpressions();
    verify(mockOESType, atLeast(1)).getObligationExpression();
    verify(mockOEType, atLeast(1)).getFulfillOn();
    JAXBElement<?> mockJaxBElement = Mockito.mock(JAXBElement.class);
    Object mockValueObject = Mockito.mock(Object.class);
    doReturn(mockJaxBElement).when(mockConditionType).getExpression();
    doReturn(mockValueObject).when(mockJaxBElement).getValue();
    try {
        processor.rule(mockRuleType);
        fail();
    } catch (IllegalArgumentException e) {
        verify(mockConditionType, atLeast(1)).getExpression();
        verify(mockJaxBElement, atLeast(1)).getValue();
    }
}