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

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