title: How to create access table from Spring security based application?
body: <p>Recently, I join a team which is working on a server. There are many module and API and my task is to prepare Access Table document of REST APIs. For example, there is an API to get a list of contents:</p>
  
  <pre><code>GET: /api/v2/cms/contents
  </code></pre>
  
  <p>On the Other hand, many authorities in the modules:</p>
  
  <ul>
  <li>manager</li>
  <li>view</li>
  <li>anonymous </li>
  <li>...</li>
  </ul>
  
  <p>I have to know which authorities are required to call the REST?!</p>
  
  <p>Good news is, there are many integration tests (implemented with JUnit and spring test).</p>
  
  <p>I want to run tests and log access check as follow:</p>
  
  <pre><code>{TEST Name}: {list of required authorities} 
  </code></pre>
  
  <p>Is there any way to mock security and integrates with JUnit to collect required authorities during a test case?</p>