@Test
public void testReadElement() throws Exception {

	Payload p1 = new Payload();
	p1.setPayloadURI("cid:first_attachment");
	Payload p2 = new Payload();
	p2.setPayloadURI("#second_attachment");
			
    Collection<IPayload> payloads = PayloadInfoElement.readElement(createXML(
    		"<eb3:PayloadInfo " +
        	"	xmlns:eb3=\"http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/\">" +
        	"   <eb3:PartInfo href=\"" + p1.getPayloadURI() + "\"/>" + 
        	"   <eb3:PartInfo href=\"" + p2.getPayloadURI() + "\"/>" + 
        	"</eb3:PayloadInfo>"
            ));
    
    assertFalse(Utils.isNullOrEmpty(payloads));
    Iterator<IPayload> payloadsIt = payloads.iterator();
    assertTrue(payloadsIt.hasNext());
    IPayload p = payloadsIt.next();
    assertEquals(IPayload.Containment.ATTACHMENT, p.getContainment());
    assertTrue(payloadsIt.hasNext());
    p = payloadsIt.next();
    assertEquals(IPayload.Containment.BODY, p.getContainment());
    assertFalse(payloadsIt.hasNext());
}