@@ -0,0 +1,2409 @@
+/**%0A * Copyright 2011 OpenEngSB Division, Vienna University of Technology%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 */%0A%0Apackage org.openengsb.opencit.core.projectmanager.model;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.Map;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.openengsb.core.common.Domain;%0Aimport org.openengsb.domain.notification.NotificationDomain;%0Aimport org.openengsb.domain.report.ReportDomain;%0Aimport org.openengsb.domain.scm.ScmDomain;%0A%0Apublic class ProjectModelTest %7B%0A%0A    private Project p;%0A%0A    @Before%0A    public void setUp() %7B%0A        p = new Project();%0A    %7D%0A%0A    @Test%0A    public void addService_shouldWork() %7B%0A        p.addService(ScmDomain.class, %22Scm1234%22);%0A        p.addService(ReportDomain.class, %22Report9876%22);%0A%0A        Map%3CClass%3C? extends Domain%3E, String%3E services = p.getServices();%0A        assertEquals(2, services.size());%0A        assertTrue(services.containsKey(ScmDomain.class));%0A        assertEquals(services.get(ScmDomain.class), %22Scm1234%22);%0A        assertTrue(services.containsKey(ReportDomain.class));%0A        assertEquals(services.get(ReportDomain.class), %22Report9876%22);%0A        assertFalse(services.containsKey(NotificationDomain.class));%0A    %7D%0A%0A    @Test%0A    public void getServices_shouldWork() %7B%0A        Map%3CClass%3C? extends Domain%3E, String%3E services = p.getServices();%0A        assertEquals(0, services.size());%0A    %7D%0A%0A    @Test%0A    public void addService_overwrite_shouldWork() %7B%0A        p.addService(ScmDomain.class, %22Scm1234%22);%0A        p.addService(ScmDomain.class, %22Scm0000%22);%0A        Map%3CClass%3C? extends Domain%3E, String%3E services = p.getServices();%0A        assertEquals(1, services.size());%0A        assertTrue(services.containsKey(ScmDomain.class));%0A        assertEquals(services.get(ScmDomain.class), %22Scm0000%22);%0A    %7D%0A%7D%0A

Add a test for Project::addService and Project::getServices