packageat.ac.tuwien.sepm.assignment.individual.unit.persistence;importstaticorg.junit.jupiter.api.Assertions.*;importat.ac.tuwien.sepm.assignment.individual.entity.Horse;importat.ac.tuwien.sepm.assignment.individual.persistence.HorseDao;importorg.junit.jupiter.api.DisplayName;importorg.junit.jupiter.api.Test;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.dao.DataAccessException;importjava.sql.Date;publicabstractclassHorseDaoTestBase{@AutowiredHorseDaohorseDao;@Test@DisplayName("Adding a new horse with the correct parameters should return the horse")publicvoidaddingNewHorse_correctParameters_shouldReturnHorse(){Stringbirthday="2020-01-01";HorsenewHorse=newHorse("Zephyr","Nice horse",(short)4,Date.valueOf(birthday),null);HorsesavedHorse=horseDao.addHorse(newHorse);assertEquals(newHorse,savedHorse);}@Test@DisplayName("Adding a new horse with the incorrect parameters should throw DataAccessException")publicvoidaddingNewHorse_incorrectParameters_shouldThrowDataAccess(){Stringbirthday="2020-01-01";HorsenewHorse=newHorse("Zephyr","Nice horse",(short)80,Date.valueOf(birthday),null);assertThrows(DataAccessException.class,()->horseDao.addHorse(newHorse));}}