title: Spring OAuth and Boot Integration Test
body: <p>What is the best way to run Spring Boot integration tests agains a OAuth Resource server configured web application.</p>
  
  <p>I can think of two theoretical approaches:</p>
  
  <ol>
  <li>Mock the security context in the resource server without acutally calling the Authorization server.</li>
  <li>Embed the Authorization server as part of the test and redirect the authentication to it.</li>
  </ol>
  
  <p>I was wondering how others have approach this problem. </p>