title: Unit testing with @SpringBootTest(classes = Application.class)
body: <p>Currently a colleague is arguing that </p>
  
  <p>My test written as below: </p>
  
  <pre><code>@SpringBootTest(classes = App.class)
  public class ServiceTest {
  
      private Integer a;
      private String str;
  
  
      @Before
      public void prepareTestData() {
         //
      }
  
      @Test
      public void test_scenario_1() {
          //
      } 
  }
  </code></pre>
  
  <p>is not a unit test for my Service class because I am pulling through all the application using </p>
  
  <pre><code>@SpringBootTest(classes = App.class)
  </code></pre>
  
  <p>I understand that unit tests should be testing the service code in complete isolation, but I am not having a autowire service depdency injection of any sort in my test code.</p>
  
  <p>My question is what is the @SpringBootTest(classes = App.class) annotation doing behind the scenes is it really bootstraping the complete application before the test code is run? </p>
  
  <p>Is the test above really an integration test?</p>