@@ -0,0 +1,957 @@
+package de.bornemisza.sessions.endpoint;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0Aimport static org.mockito.Mockito.*;%0A%0Aimport de.bornemisza.rest.exception.UnauthorizedException;%0Aimport de.bornemisza.rest.security.DoubleSubmitToken;%0Aimport de.bornemisza.sessions.boundary.UuidsFacade;%0A%0Apublic class UuidsTest %7B%0A    %0A    private Uuids CUT;%0A    private UuidsFacade facade;%0A%0A    public UuidsTest() %7B%0A    %7D%0A    %0A    @Before%0A    public void setUp() %7B%0A        facade = mock(UuidsFacade.class);%0A        CUT = new Uuids(facade);%0A    %7D%0A%0A    @Test%0A    public void getUuids_unauthorized() %7B%0A        when(facade.getUuids(any(DoubleSubmitToken.class), anyInt())).thenThrow(new UnauthorizedException(%22meh%22));%0A        try %7B%0A            CUT.getUuids(%22someCookie%22, %22someToken%22, 1);%0A            fail();%0A        %7D%0A        catch (RestException ex) %7B%0A            assertEquals(401, ex.getResponse().getStatus());%0A        %7D%0A    %7D%0A    %0A%7D%0A

add test