title: How to properly test spring boot applications?
body: <p>This is kind of architectural and a broad question. </p>
  
  <p>I have a spring rest app with three layers. (1) Front controllers (rest or mvc controllers), (2) a service layer between controllers and DAO, (3) a DAO layer which is spring data jpa repositories in my case. Now, the question is, I have written integration test for the controllers using @WebMvcTest with test slicing. For the DAO layer, I am using @DataJpaTest which is sliced testing for JPA repositories. The service layer is plain java classes so I have just unit tests with mocked DAO's.</p>
  
  <ol>
  <li><p>Now, is there still a good reason for doing a full integration testing which will start the whole container and hit up to the DB?</p></li>
  <li><p>I also send SpringApplicationEvents inside my application. Is there any need to test if they are working properly? And if yes, how?</p></li>
  <li><p>The service layer also controls transactions. Again, is there a need to test if transactions working as expected, and how?</p></li>
  </ol>
  
  <p>Thanks in advance        </p>