Marshaller marshaller = control.createMock(Marshaller.class);
ContextUtils.getJAXBContext().createMarshaller();
EasyMock.expectLastCall().andReturn(marshaller);
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
EasyMock.expectLastCall();
IArgumentMatcher matcher = new JAXBEltMatcher();
int expectedMarshals = requestor ? expectedValues.length - 1 : expectedValues.length;
for (int i = 0; i < expectedMarshals; i++) {
EasyMock.reportMatcher(matcher);
EasyMock.eq(header);
marshaller.marshal(null, header);