@@ -0,0 +1,2408 @@
+/*%0A * Copyright 2016 Jaakko Hannikainen%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *  http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A */%0Apackage fi.jgke.tagger.domain;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.UUID;%0Aimport junit.framework.Assert;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0Aimport org.springframework.security.crypto.bcrypt.BCrypt;%0A%0Apublic class PersonTest %7B%0A%0A    public PersonTest() %7B%0A    %7D%0A%0A    @Test%0A    public void testSetGetUsername() %7B%0A        String value = UUID.randomUUID().toString();%0A        Person instance = new Person();%0A        instance.setUsername(value);%0A        assertEquals(value, instance.getUsername());%0A    %7D%0A%0A    @Test%0A    public void testSetGetPassword() %7B%0A        String value = UUID.randomUUID().toString();%0A        Person instance = new Person();%0A        instance.setPassword(value);%0A        assertEquals(BCrypt.hashpw(value, instance.getSalt()), instance.getPassword());%0A    %7D%0A%0A    @Test%0A    public void testSetGetSalt() %7B%0A        String value = UUID.randomUUID().toString();%0A        Person instance = new Person();%0A        instance.setSalt(value);%0A        assertEquals(value, instance.getSalt());%0A    %7D%0A%0A    @Test%0A    public void testSetGetIsAdmin() %7B%0A        boolean value;%0A        Person instance = new Person();%0A%0A        value = false;%0A        instance.setAdmin(value);%0A        assertEquals(value, instance.isAdmin());%0A%0A        value = true;%0A        instance.setAdmin(value);%0A        assertEquals(value, instance.isAdmin());%0A    %7D%0A%0A    @Test%0A    public void testSetGetSources() %7B%0A        Person instance = new Person();%0A        List%3CSource%3E sources = new ArrayList%3C%3E();%0A        for (int i = 0; i %3C 3; i++) %7B%0A            Source source = new Source();%0A            source.setTitle(UUID.randomUUID().toString());%0A            sources.add(source);%0A        %7D%0A        instance.setSources(sources);%0A        assertEquals(sources, instance.getSources());%0A    %7D%0A%7D%0A

Add test for Person