@Test
public void testHtmlProcessorRuleNullEmptyList() {

    PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class);
    RuleType mockRuleType = Mockito.mock(RuleType.class);
    TargetType mockTargetType = Mockito.mock(TargetType.class);
    EffectType effectTypePermit = EffectType.PERMIT;
    AdviceExpressionsType mockAdviceExsType = Mockito.mock(AdviceExpressionsType.class);
    AdviceExpressionType mockAdviceEx = Mockito.mock(AdviceExpressionType.class);
    processor = new HtmlProcessor(temp, mockPolicySetType);
    List<AnyOfType> anyOfList = new ArrayList<AnyOfType>();
    List<AdviceExpressionType> adviceExList = new ArrayList<AdviceExpressionType>();
    adviceExList.add(mockAdviceEx);
    when(mockRuleType.getEffect()).thenReturn(effectTypePermit);
    when(mockRuleType.getRuleId()).thenReturn(null);
    when(mockRuleType.getTarget()).thenReturn(mockTargetType);
    when(mockRuleType.getObligationExpressions()).thenReturn(null);
    when(mockRuleType.getAdviceExpressions()).thenReturn(mockAdviceExsType);
    when(mockTargetType.getAnyOf()).thenReturn(null);
    when(mockAdviceExsType.getAdviceExpression()).thenReturn(adviceExList);
    when(mockAdviceEx.getAttributeAssignmentExpression()).thenReturn(null);
    when(mockAdviceEx.getAppliesTo()).thenReturn(effectTypePermit);
    processor.rule(mockRuleType);
    verify(mockRuleType, atLeast(1)).getEffect();
    verify(mockRuleType, atLeast(1)).getRuleId();
    verify(mockRuleType, atLeast(1)).getTarget();
    verify(mockRuleType, atLeast(1)).getCondition();
    verify(mockRuleType, atLeast(1)).getObligationExpressions();
    verify(mockRuleType, atLeast(1)).getAdviceExpressions();
    verify(mockTargetType, atLeast(1)).getAnyOf();
    verify(mockAdviceExsType, atLeast(1)).getAdviceExpression();
    verify(mockAdviceEx, atLeast(1)).getAttributeAssignmentExpression();
    verify(mockAdviceEx, atLeast(1)).getAppliesTo();
    when(mockTargetType.getAnyOf()).thenReturn(anyOfList);
    processor.rule(mockRuleType);
    verify(mockTargetType, atLeast(1)).getAnyOf();
}