// Path: step9_soap_message_logging_into_custom_elasticsearch_field/src/test/java/de/jonashackt/tutorial/utils/TestHelper.java
// public static ForecastRequest generateDummyRequest() {
//     ForecastRequest forecastRequest = new ForecastRequest();
//     forecastRequest.setZIP("99425");
//     forecastRequest.setFlagcolor("blackblue");
//     forecastRequest.setProductName(ProductName.FORECAST_BASIC);
//     ForecastCustomer customer = new ForecastCustomer();
//     customer.setAge(67);
//     customer.setContribution(500);
//     customer.setMethodOfPayment("Bitcoin");
//     forecastRequest.setForecastCustomer(customer);
//     return forecastRequest;
// }
// 
// Path: step9_soap_message_logging_into_custom_elasticsearch_field/src/test/java/de/jonashackt/tutorial/WebServiceIntegrationTestConfiguration.java
// @Configuration
// public class WebServiceIntegrationTestConfiguration {
//     
//     @Bean
//     public WeatherService weatherServiceIntegrationTestClient() {
//         JaxWsProxyFactoryBean jaxWsProxyFactory = new JaxWsProxyFactoryBean();
//         jaxWsProxyFactory.setServiceClass(WeatherService.class);
//         jaxWsProxyFactory.setAddress("http://localhost:8080" + WebServiceConfiguration.BASE_URL + WebServiceConfiguration.SERVICE_URL);
//         return (WeatherService) jaxWsProxyFactory.create();
//     }
// }


import static de.jonashackt.tutorial.utils.TestHelper.generateDummyRequest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import de.codecentric.namespace.weatherservice.WeatherException;
import de.codecentric.namespace.weatherservice.WeatherService;
import de.codecentric.namespace.weatherservice.general.ForecastRequest;
import de.codecentric.namespace.weatherservice.general.ForecastReturn;
import de.jonashackt.tutorial.WebServiceIntegrationTestConfiguration;
package de.jonashackt.tutorial.endpoint;




@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes=WebServiceIntegrationTestConfiguration.class)
public class WeatherServiceIntegrationTest {

    @Autowired
    private WeatherService weatherServiceIntegrationTestClient;
    
    @Test
    public void getCityForecastByZIP() throws WeatherException {
        // Given
// Path: step9_soap_message_logging_into_custom_elasticsearch_field/src/test/java/de/jonashackt/tutorial/utils/TestHelper.java
// public static ForecastRequest generateDummyRequest() {
//     ForecastRequest forecastRequest = new ForecastRequest();
//     forecastRequest.setZIP("99425");
//     forecastRequest.setFlagcolor("blackblue");
//     forecastRequest.setProductName(ProductName.FORECAST_BASIC);
//     ForecastCustomer customer = new ForecastCustomer();
//     customer.setAge(67);
//     customer.setContribution(500);
//     customer.setMethodOfPayment("Bitcoin");
//     forecastRequest.setForecastCustomer(customer);
//     return forecastRequest;
// }
// 
// Path: step9_soap_message_logging_into_custom_elasticsearch_field/src/test/java/de/jonashackt/tutorial/WebServiceIntegrationTestConfiguration.java
// @Configuration
// public class WebServiceIntegrationTestConfiguration {
//     
//     @Bean
//     public WeatherService weatherServiceIntegrationTestClient() {
//         JaxWsProxyFactoryBean jaxWsProxyFactory = new JaxWsProxyFactoryBean();
//         jaxWsProxyFactory.setServiceClass(WeatherService.class);
//         jaxWsProxyFactory.setAddress("http://localhost:8080" + WebServiceConfiguration.BASE_URL + WebServiceConfiguration.SERVICE_URL);
//         return (WeatherService) jaxWsProxyFactory.create();
//     }
// }


// Path: step9_soap_message_logging_into_custom_elasticsearch_field/src/test/java/de/jonashackt/tutorial/endpoint/WeatherServiceIntegrationTest.java
import static de.jonashackt.tutorial.utils.TestHelper.generateDummyRequest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import de.codecentric.namespace.weatherservice.WeatherException;
import de.codecentric.namespace.weatherservice.WeatherService;
import de.codecentric.namespace.weatherservice.general.ForecastRequest;
import de.codecentric.namespace.weatherservice.general.ForecastReturn;
import de.jonashackt.tutorial.WebServiceIntegrationTestConfiguration;

package de.jonashackt.tutorial.endpoint;




@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes=WebServiceIntegrationTestConfiguration.class)
public class WeatherServiceIntegrationTest {

    @Autowired
    private WeatherService weatherServiceIntegrationTestClient;
    
    @Test
    public void getCityForecastByZIP() throws WeatherException {
        // Given
        ForecastRequest forecastRequest = generateDummyRequest();