content: package br.com.alevhvm.adotai.common.config;
  
  import org.junit.jupiter.api.Test;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
  import org.springframework.boot.test.context.SpringBootTest;
  import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
  import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
  import org.springframework.test.web.servlet.MockMvc;
  
  @SpringBootTest
  @AutoConfigureMockMvc
  public class SwaggerAccessTest {
      
      @Autowired
      private MockMvc mockMvc;
      //MockMvc testa as controllers sem subir o servidor
  
      @Test
      void devePermitirAcessoAoSwaggerSemAutenticao() throws Exception {
          mockMvc.perform(get("/swagger-ui/index.html"))
                  .andExpect(status().isOk());
      }
  
      @Test
      void devePermitirAcessoAoEndpointDeDocumentacao() throws Exception {
          mockMvc.perform(get("/v3/api-docs"))
                  .andExpect(status().isOk());
      }
  }
  