title: SpringBootTest annotation in test classes
body: <p>I had an error during my jUnit test after adding a second test class.</p>
  
  <pre><code>java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
  </code></pre>
  
  <p>...so I added (classes=...) part to the SpringBootTest annotation, and tests run fine.</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(classes = {mySecondJUnitClass.class})
  public class mySecondJUnitClass{
  </code></pre>
  
  <p>What I didn't understand is, I didn't add that "classes" to my first test class, I only set @SpringBootTest annotation and worked fine. </p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class myFirstJUnitClass{
  </code></pre>
  
  <p>When and why do we need that "classes" definition? Why is not @SpringBootTest not enough?</p>