title: mvn test not running Spring Boot test
body: <p>I have a simple test class in a SpringBoot application.</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @WebMvcTest(RestaurantController.class)
  
  public class RestaurantControllerTest {
  
    @Test
    public void displayRestaurant() throws Exception{
    ...
    }
  }
  </code></pre>
  
  <p>My relevant pom.xml is this.</p>
  
  <pre><code>...
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&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;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.21.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*Test.java&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>However when I run mvn test, Maven doesn't discover the test class with the [Info] No tests to run.</p>
  
  <p>What am I doing wrong here? I'm also not sure if adding the surefire plugin is necessary as I have the test class ending with 'Test' and I don't need any test reports.</p>