packageat.ac.tuwien.sepm.assignment.individual.unit.service;importstaticorg.junit.jupiter.api.Assertions.*;importat.ac.tuwien.sepm.assignment.individual.entity.Owner;importat.ac.tuwien.sepm.assignment.individual.service.OwnerService;importat.ac.tuwien.sepm.assignment.individual.util.ValidationException;importorg.junit.jupiter.api.DisplayName;importorg.junit.jupiter.api.Test;importorg.junit.jupiter.api.extension.ExtendWith;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.boot.test.context.SpringBootTest;importorg.springframework.test.context.ActiveProfiles;importorg.springframework.test.context.junit.jupiter.SpringExtension;importstaticorg.junit.jupiter.api.Assertions.assertEquals;@ExtendWith(SpringExtension.class)@SpringBootTest@ActiveProfiles("test")publicclassOwnerServiceTest{@AutowiredOwnerServiceownerService;@Test@DisplayName("Adding a new owner with the correct parameters will return the new owner")publicvoidaddingNewOwner_correctParameters_shouldReturnOwner(){OwnernewOwner=newOwner("Chad");OwnersavedOwner=ownerService.addOwner(newOwner);assertEquals(newOwner,savedOwner);}@Test@DisplayName("Adding a new owner with the incorrect parameters will throw a ValidationException")publicvoidaddingNewOwner_incorrectParameters_shouldThrowValidation(){OwnernewOwner=newOwner("");assertThrows(ValidationException.class,()->ownerService.addOwner(newOwner));}}