@Test
    void shouldThrowParseException() throws ParseException {
        Mockito.when(clinicService.findPetTypes()).thenReturn(makePetTypes());
        Assertions.assertThrows(ParseException.class, () -> {
            petTypeFormatter.parse("Fish", Locale.ENGLISH);
        });
    }
Test class for {@link PetTypeFormatter}

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