}
@Test
public void testEqual() {
JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
FooType data = new FooType();
data.setName("CXF");
data.setNumber(2);
QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
assertion.setName(qn);
assertion.setData(data);
PolicyComponent pc = new Policy();
assertTrue(!assertion.equal(pc));
pc = (PolicyComponent)new All();
assertTrue(!assertion.equal(pc));
pc = (PolicyComponent)new ExactlyOne();
assertTrue(!assertion.equal(pc));
IMocksControl ctrl = EasyMock.createNiceControl();
XmlPrimitiveAssertion xpa = ctrl.createMock(XmlPrimitiveAssertion.class);
QName oqn = new QName("http://cxf.apache.org/test/assertions/blah", "OtherType");
EasyMock.expect(xpa.getName()).andReturn(oqn);
EasyMock.expect(xpa.getType()).andReturn(Constants.TYPE_ASSERTION);
ctrl.replay();
assertTrue(!assertion.equal(xpa));
ctrl.verify();
FooType odata = new FooType();
odata.setName(data.getName());
odata.setNumber(data.getNumber());
JaxbAssertion<FooType> oassertion = new JaxbAssertion<FooType>();
oassertion.setData(odata);
oassertion.setName(qn);
assertTrue(!assertion.equal(oassertion));
oassertion.setData(data);