@@ -0,0 +1,1485 @@
+package at.ac.tuwien.inso.dao_tests;%0A%0Aimport at.ac.tuwien.inso.entity.Role;%0Aimport at.ac.tuwien.inso.entity.UserAccount;%0Aimport at.ac.tuwien.inso.repository.UserAccountRepository;%0Aimport org.junit.Before;%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.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0A@ActiveProfiles(%22test%22)%0A@Transactional%0Apublic class UserAccountRepositoryTests %7B%0A%0A    @Autowired%0A    private UserAccountRepository userAccountRepository;%0A%0A    private UserAccount existingUserAccount;%0A%0A    @Before%0A    public void setUp() %7B%0A        this.existingUserAccount = new UserAccount(%22user1%22, %22pass%22);%0A        this.existingUserAccount.setRole(Role.ADMIN);%0A        userAccountRepository.save(existingUserAccount);%0A    %7D%0A%0A    @Test%0A    public void testExistsForExistingUsername() throws Exception %7B%0A        assertTrue(userAccountRepository.existsByUsername(existingUserAccount.getUsername()));%0A    %7D%0A%0A    @Test%0A    public void testExistsForNonExistingUsername() throws Exception %7B%0A        assertFalse(userAccountRepository.existsByUsername(%22some_non_existing_username%22));%0A    %7D%0A%7D%0A

test the UserAccountRepository