@Test
public void testHtmlProcessorTarget() {

    PolicySetType mockPolicySetType = Mockito.mock(PolicySetType.class);
    processor = new HtmlProcessor(temp, mockPolicySetType);
    processor.target(null);
    AnyOfType mockAnyOfType = Mockito.mock(AnyOfType.class);
    List<AnyOfType> anyOfList = new ArrayList<AnyOfType>();
    anyOfList.add(mockAnyOfType);
    anyOfList.add(mockAnyOfType); // adding duplicate element
    AllOfType mockAllOfType = Mockito.mock(AllOfType.class);
    List<AllOfType> allOfTypeList = new ArrayList<AllOfType>();
    allOfTypeList.add(mockAllOfType);
    allOfTypeList.add(mockAllOfType); // adding duplicate element
    MatchType mockMatchType = Mockito.mock(MatchType.class);
    List<MatchType> matchTypeList = new ArrayList<MatchType>();
    matchTypeList.add(mockMatchType);
    matchTypeList.add(mockMatchType); // adding duplicate element
    AttributeValueType mockAttrValType = Mockito.mock(AttributeValueType.class);
    AttributeDesignatorType mockAttrDesType = Mockito.mock(AttributeDesignatorType.class);
    AttributeSelectorType mockAttrSelType = Mockito.mock(AttributeSelectorType.class);
    List<Object> contentList = new ArrayList<Object>();
    when(mockAnyOfType.getAllOf()).thenReturn(allOfTypeList);
    when(mockAllOfType.getMatch()).thenReturn(matchTypeList);
    when(mockMatchType.getAttributeValue()).thenReturn(mockAttrValType);
    when(mockMatchType.getMatchId()).thenReturn(XACML1.ID_FUNCTION_STRING_EQUAL.stringValue());
    when(mockMatchType.getAttributeDesignator()).thenReturn(mockAttrDesType);
    when(mockAttrValType.getDataType()).thenReturn("");
    when(mockAttrValType.getContent()).thenReturn(contentList);
    when(mockAttrDesType.getCategory()).thenReturn("");
    when(mockAttrDesType.getAttributeId()).thenReturn("");
    when(mockAttrDesType.getIssuer()).thenReturn("");
    when(mockAttrDesType.getDataType()).thenReturn("");
    processor.target(anyOfList);
    verify(mockAnyOfType, atLeast(1)).getAllOf();
    verify(mockAllOfType, atLeast(1)).getMatch();
    verify(mockMatchType, atLeast(1)).getAttributeValue();
    verify(mockMatchType, atLeast(1)).getMatchId();
    verify(mockMatchType, atLeast(1)).getAttributeDesignator();
    verify(mockAttrValType, atLeast(1)).getDataType();
    verify(mockAttrValType, atLeast(1)).getContent();
    verify(mockAttrDesType, atLeast(1)).getCategory();
    verify(mockAttrDesType, atLeast(1)).getAttributeId();
    verify(mockAttrDesType, atLeast(1)).getIssuer();
    verify(mockAttrDesType, atLeast(1)).getDataType();
    when(mockMatchType.getAttributeDesignator()).thenReturn(null);
    when(mockMatchType.getAttributeSelector()).thenReturn(mockAttrSelType);
    when(mockAttrSelType.getCategory()).thenReturn("");
    when(mockAttrSelType.getContextSelectorId()).thenReturn("");
    when(mockAttrSelType.getDataType()).thenReturn("");
    processor.target(anyOfList);
    verify(mockMatchType, atLeast(1)).getAttributeDesignator();
    verify(mockMatchType, atLeast(1)).getAttributeSelector();
    verify(mockAttrSelType, atLeast(1)).getCategory();
    verify(mockAttrSelType, atLeast(1)).getContextSelectorId();
    verify(mockAttrSelType, atLeast(1)).getDataType();
    when(mockMatchType.getAttributeDesignator()).thenReturn(null);
    when(mockMatchType.getAttributeSelector()).thenReturn(null);
    processor.target(anyOfList);
    verify(mockMatchType, atLeast(1)).getAttributeDesignator();
    verify(mockMatchType, atLeast(1)).getAttributeSelector();
}