/**
* Tests that the headers are set correctly.
*/
public void testGenerateServiceStub_v200909Headers() throws ServiceException {
testUser.setAuthToken("testAuthToken");
Stub stub = AdWordsServiceFactory.generateServiceStub(
AdWordsService.V200909.ADGROUP_AD_SERVICE, testUser);
for (SOAPHeaderElement soapHeaderElement : stub.getHeaders()) {
com.google.api.adwords.v200909.cm.SoapHeader header =
(com.google.api.adwords.v200909.cm.SoapHeader) soapHeaderElement.getObjectValue();
assertEquals("authToken", "testAuthToken", header.getAuthToken());
assertEquals("clientEmail", testUser.getClientEmail(), header.getClientEmail());