@Test
public void check_redirect_needed() throws Exception
{
Request request = mockRequest();
Response response = mockResponse();
MetaDataLocator locator = mockMetaDataLocator();
Link link = mockLink();
ComponentEventLinkEncoder encoder = newMock(ComponentEventLinkEncoder.class);
train_isSecure(request, false);
train_isSecure(locator, PAGE_NAME, true);
PageRenderRequestParameters parameters = new PageRenderRequestParameters(PAGE_NAME, new EmptyEventContext(),
false);
train_createPageRenderLink(encoder, parameters, link);
response.sendRedirect(link);
replay();
RequestSecurityManager manager = new RequestSecurityManagerImpl(request, response, encoder, locator, true);