@@ -0,0 +1,1856 @@
+package com.example.helloworld.db;%0A%0Aimport com.example.helloworld.core.Person;%0Aimport io.dropwizard.testing.junit.DAOTestRule;%0Aimport org.hibernate.exception.ConstraintViolationException;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport java.util.List;%0Aimport java.util.Optional;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class PersonDAOTest %7B%0A%0A    @Rule%0A    public DAOTestRule daoTestRule = DAOTestRule.newBuilder()%0A        .addEntityClass(Person.class)%0A        .build();%0A%0A    private PersonDAO personDAO;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        personDAO = new PersonDAO(daoTestRule.getSessionFactory());%0A    %7D%0A%0A    @Test%0A    public void createPerson() %7B%0A        final Person jeff = daoTestRule.inTransaction(() -%3E personDAO.create(new Person(%22Jeff%22, %22The plumber%22)));%0A        assertThat(jeff.getId()).isGreaterThan(0);%0A        assertThat(jeff.getFullName()).isEqualTo(%22Jeff%22);%0A        assertThat(jeff.getJobTitle()).isEqualTo(%22The plumber%22);%0A        assertThat(personDAO.findById(jeff.getId())).isEqualTo(Optional.of(jeff));%0A    %7D%0A%0A    @Test%0A    public void findAll() %7B%0A        daoTestRule.inTransaction(() -%3E %7B%0A            personDAO.create(new Person(%22Jeff%22, %22The plumber%22));%0A            personDAO.create(new Person(%22Jim%22, %22The cook%22));%0A            personDAO.create(new Person(%22Randy%22, %22The watchman%22));%0A        %7D);%0A%0A        final List%3CPerson%3E persons = personDAO.findAll();%0A        assertThat(persons).extracting(%22fullName%22).containsOnly(%22Jeff%22, %22Jim%22, %22Randy%22);%0A        assertThat(persons).extracting(%22jobTitle%22).containsOnly(%22The plumber%22, %22The cook%22, %22The watchman%22);%0A    %7D%0A%0A    @Test(expected = ConstraintViolationException.class)%0A    public void handlesNullFullName() %7B%0A        daoTestRule.inTransaction(() -%3E personDAO.create(new Person(null, %22The null%22)));%0A    %7D%0A%7D%0A

Add a test for PersonDAO