@Test
    void testShowVisits() throws Exception {
        mockMvc.perform(get("/owners/*/pets/{petId}/visits", TEST_PET_ID))
            .andExpect(status().isOk())
            .andExpect(model().attributeExists("visits"))
            .andExpect(view().name("visitList"));
    }
Test class for {@link VisitController}

@author Colin But
src/test/java/org/springframework/samples/petclinic/web/VisitControllerTests.java