public void verifyBehaviourDuringHandleGetRequestWithEmptyAuthorizationHeaderSet() throws Exception {
final String requestPathInfo = "/path/1";
// We already found that it was unauthorized
final UnauthorizedStubResponse mockStubResponse = Mockito.mock(UnauthorizedStubResponse.class);
when(mockHttpServletRequest.getMethod()).thenReturn(HttpMethods.GET);
when(mockHttpServletRequest.getHeader(StubRequest.AUTH_HEADER)).thenReturn("");
when(mockHttpServletRequest.getPathInfo()).thenReturn(requestPathInfo);
final StubRequest assertionStubRequest = StubRequest.createFromHttpServletRequest(mockHttpServletRequest);
when(mockStubbedDataManager.findStubResponseFor(assertionStubRequest)).thenReturn(mockStubResponse);
when(mockStubResponse.getStubResponseType()).thenReturn(StubResponseTypes.UNAUTHORIZED);
when(mockStubResponse.getStatus()).thenReturn("200");
final StubsPortalHandler stubsPortalHandler = new StubsPortalHandler(mockStubbedDataManager);
stubsPortalHandler.handle(requestPathInfo, mockRequest, mockHttpServletRequest, mockHttpServletResponse);
verify(mockHttpServletResponse, times(1)).setStatus(HttpStatus.UNAUTHORIZED_401);