title: Test Spring/SpringBoot without Application
body: <p>I want to write integration tests that will have to use Spring Framework and a custom JPA provider. Straightforward answer as I thought would be to create a test class and annotate it as follows:</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class Test { ...
  </code></pre>
  
  <p>Hoping for the all of the default auto-configuration required to happen on its own. But it doesn't the error is:</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>Can I avoid creating the:</p>
  
  <pre><code>@SpringBootApplication
  public class TestApp { ...
  </code></pre>
  
  <p>and only use src/test/java folder and provide configuration with "@SpringBootTest(classes=...)"? What kind of configuration class do I need then?</p>