@@ -0,0 +1,1771 @@
+package at.ac.tuwien.inso.dao_tests;%0A%0Aimport at.ac.tuwien.inso.entity.*;%0Aimport at.ac.tuwien.inso.repository.LecturerRepository;%0Aimport at.ac.tuwien.inso.repository.UisUserRepository;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.context.ActiveProfiles;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0Aimport org.springframework.transaction.annotation.Transactional;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNull;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0A@ActiveProfiles(%22test%22)%0A@Transactional%0Apublic class LecturerRepositoryTests %7B%0A%0A    @Autowired%0A    private UisUserRepository uisUserRepository;%0A%0A    @Autowired%0A    private LecturerRepository lecturerRepository;%0A%0A    @Test%0A    public void findLecturerByAccountIdSuccessTest() %7B%0A%0A        // create lecturer account%0A        UserAccount account = new UserAccount(%22lecturer%22, %22pass%22, Role.LECTURER);%0A        Lecturer expectedLecturer = uisUserRepository.save(new Lecturer(%22l0100011%22, %22Una Walker%22, %22una.walker@uis.at%22, account));%0A        Long accountId = account.getId();%0A%0A        // assert the create lecturer matches with the one found%0A        Lecturer actualLecturer = lecturerRepository.findLecturerByAccountId(accountId);%0A        assertEquals(expectedLecturer, actualLecturer);%0A    %7D%0A%0A    @Test%0A    public void findLecturerByAccountIdFailureTest() %7B%0A%0A        // search by some invalid id and make sure null is returned%0A        Long accountId = new Long(-1);%0A        Lecturer actualLecturer = lecturerRepository.findLecturerByAccountId(accountId);%0A        assertNull(actualLecturer);%0A    %7D%0A%7D%0A

write dao tests for LecturerRepository