@@ -0,0 +1,2030 @@
+package at.ac.tuwien.inso;%0A%0Aimport at.ac.tuwien.inso.entity.*;%0Aimport at.ac.tuwien.inso.repository.*;%0Aimport org.junit.*;%0Aimport org.junit.runner.*;%0Aimport org.springframework.beans.factory.annotation.*;%0Aimport org.springframework.boot.test.autoconfigure.web.servlet.*;%0Aimport org.springframework.boot.test.context.*;%0Aimport org.springframework.test.context.*;%0Aimport org.springframework.test.context.junit4.*;%0Aimport org.springframework.test.web.servlet.*;%0Aimport org.springframework.transaction.annotation.*;%0A%0Aimport java.math.*;%0A%0Aimport static java.util.Arrays.*;%0Aimport static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*;%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0A@AutoConfigureMockMvc%0A@ActiveProfiles(%22test%22)%0A@Transactional%0Apublic class StudyPlanTest %7B%0A%0A    private StudyPlan studyPlan1 = new StudyPlan(%22Bachelor Software and Information Engineering%22, new EctsDistribution(new BigDecimal(90), new BigDecimal(60), new BigDecimal(30)));%0A    private StudyPlan studyPlan2 = new StudyPlan(%22Master Business Informatics%22, new EctsDistribution(new BigDecimal(30), new BigDecimal(70), new BigDecimal(20)));%0A    private StudyPlan studyPlan3 = new StudyPlan(%22Master Computational Intelligence%22, new EctsDistribution(new BigDecimal(60),new BigDecimal(30),new BigDecimal(30)));%0A%0A    @Autowired%0A    MockMvc mockMvc;%0A%0A    @Autowired%0A    private StudyPlanRepository studyPlanRepository;%0A%0A    @Before%0A    public void setUp() %7B%0A        studyPlanRepository.save(asList(studyPlan1, studyPlan2, studyPlan3));%0A    %7D%0A%0A    @Test%0A    public void adminShouldSeeAllStudyPlans() throws Exception %7B%0A        mockMvc.perform(%0A                get(%22/admin/studyplans%22).with(user(%22admin%22).roles(%22ADMIN%22))%0A        ).andExpect(%0A                model().attribute(%22studyPlans%22, asList(studyPlan1, studyPlan2, studyPlan3))%0A        );%0A    %7D%0A%0A%7D%0A

add a test for study plans.