    @SuppressWarnings("unchecked")
    @Test
    void testListHandler() {

        List<Person> list = new ArrayList<>();
        Person p = new Person();
        p.setId(1L);
        list.add(p);

        when(mockService.findAll()).thenReturn(list);

        ExtendedModelMap model = new ExtendedModelMap();
        String viewName = personController.list(model);
        List<Person> persons = (List<Person>) model.get("persons");

        assertAll(
                () -> assertNotNull(persons),
                () -> assertEquals(1, persons.size()),
                () -> assertEquals("persons/list", viewName)
        );
    }