@Test
public void testHtmlProcessorOnPreVisitRule() {

    PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class);
    PolicyType mockPolicyType = null;
    RuleType mockRuleType = Mockito.mock(RuleType.class);
    EffectType effectTypePermit = EffectType.PERMIT;
    TargetType mockTargetType = Mockito.mock(TargetType.class);
    processor = new HtmlProcessor(temp, mockPolicySetType);
    List<AnyOfType> anyOfList = new ArrayList<AnyOfType>();
    anyOfList.add(new AnyOfType());
    when(mockRuleType.getCondition()).thenReturn(null);
    when(mockRuleType.getDescription()).thenReturn(null);
    when(mockRuleType.getEffect()).thenReturn(effectTypePermit);
    when(mockRuleType.getTarget()).thenReturn(mockTargetType);
    when(mockTargetType.getAnyOf()).thenReturn(anyOfList);
    CallbackResult callbackResult = processor.onPreVisitRule(mockPolicyType, mockRuleType);
    assertNotNull(callbackResult);
    verify(mockRuleType, atLeast(1)).getCondition();
    verify(mockRuleType, atLeast(1)).getDescription();
    verify(mockRuleType, atLeast(1)).getEffect();
    verify(mockRuleType, atLeast(1)).getTarget();
    verify(mockRuleType, atLeast(1)).getAdviceExpressions();
    verify(mockTargetType, atLeast(1)).getAnyOf();
    mockPolicyType = Mockito.mock(PolicyType.class);
    when(mockRuleType.getDescription()).thenReturn("");
    callbackResult = processor.onPreVisitRule(mockPolicyType, mockRuleType);
    assertNotNull(callbackResult);
}