title: Need to be able to catch Spring startup exception in unit test
body: <p>I've got a situation where we want to inspect Spring MVC code on startup and throw an exception (thus causing the <code>ApplicationContext</code> to to fail) when certain conditions aren't met.</p>
  
  <p>Is there a way to instrument a JUnit test to catch Spring startup (specifically, Spring Boot in most cases) exceptions so that they don't cause a test failure? I basically want to fail the test if the exception <em>doesn't</em> happen.</p>