title: The import org.springframework.test.context.junit4.SpringJUnit4ClassRunner cannot be resolved
body: <p>I'm a newbie at Spring and this is also my very first question on StackOverflow so I'm going to try to make this as understandable as possible.</p>
  
  <p>I'm trying to make a web service client using Spring and Maven on <a href="http://spring.io/guides/gs/consuming-web-service/" rel="noreferrer">this</a> tutorial:  and I get this error: The import org.springframework.test.context.junit4 cannot be resolved</p>
  
  <p>Here is my code:</p>
  
  <pre><code>package demo;
  
  import hello.WsClientApplication;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.boot.test.SpringApplicationConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; //this won't import
  
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration(classes = WsClientApplication.class)
  public class WsClientApplicationTests {
  
      @Test
      public void contextLoads() {
      }
  
  }
  </code></pre>
  
  <p>Here is my <code>pom.xml</code> in case you need it.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;gs-consuming-web-service&lt;/artifactId&gt;
      &lt;version&gt;0.1.0&lt;/version&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.2.3.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
             &lt;dependency&gt;
                 &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
                 &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;!-- tag::wsdl[] --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jvnet.jaxb2.maven2&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jaxb2-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.12.3&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;schemaLanguage&gt;WSDL&lt;/schemaLanguage&gt;
                      &lt;generatePackage&gt;hello.wsdl&lt;/generatePackage&gt;
                      &lt;schemas&gt;
                          &lt;schema&gt;
                              &lt;url&gt;http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl&lt;/url&gt;
                          &lt;/schema&gt;
                      &lt;/schemas&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- end::wsdl[] --&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I have tried some other solutions in StackOverflow but I can't get it to work.</p>
  
  <p>Thanks.</p>