@@ -0,0 +1,1317 @@
+package at.ac.tuwien.inso.service_tests;%0A%0Aimport at.ac.tuwien.inso.entity.Lecturer;%0Aimport at.ac.tuwien.inso.service.LecturerService;%0Aimport at.ac.tuwien.inso.service.impl.LecturerServiceImpl;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0Aimport org.springframework.test.context.ActiveProfiles;%0A%0Aimport java.io.UnsupportedEncodingException;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(MockitoJUnitRunner.class)%0A@ActiveProfiles(%22test%22)%0Apublic class LecturerServiceTests %7B%0A%0A    private LecturerService lecturerService;%0A%0A    @Mock%0A    private Lecturer lecturer = new Lecturer(%22l12345%22, %22lecturer%22, %22l12345@uis.at%22);%0A%0A    @Before%0A    public void setUp() %7B%0A        this.lecturerService = new LecturerServiceImpl();%0A        when(lecturer.getTwoFactorSecret()).thenReturn(%2212345%22);%0A    %7D%0A%0A    @Test%0A    public void generateQRUrlTest() throws UnsupportedEncodingException %7B%0A%0A        String expectedUrl = %22https://chart.googleapis.com/chart?chs=200x200&chld=M%25%257C0&cht=qr&chl=otpauth%253A%252F%252Ftotp%252FUIS%253Anull%253Fsecret%253D12345%2526issuer%253DUIS%22;%0A        String actualUrl = lecturerService.generateQRUrl(lecturer);%0A%0A        assertEquals(expectedUrl, actualUrl);%0A    %7D%0A%7D%0A

test generating qr url.