@Test
public void testCreateElement() throws Exception {

    String name = "agreement_name";
    String type = "agreement_type";
    String pmodeId = "some pmode id string";
    AgreementReference agreementReference = new AgreementReference(name, type, pmodeId);
    OMElement agreementRefElement = AgreementRefElement.createElement(createParent(), agreementReference);
    
    assertEquals(AGREEMENT_REF_INFO_ELEMENT_NAME, agreementRefElement.getQName());
    assertEquals(name, agreementRefElement.getText());
    assertEquals(type, agreementRefElement.getAttributeValue(new QName("type")));
    assertEquals(pmodeId, agreementRefElement.getAttributeValue(new QName("pmode")));
}