@@ -0,0 +1,1466 @@
+package org.netmelody.cieye.server.response.resource.test;%0D%0A%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport org.jmock.Expectations;%0D%0Aimport org.jmock.Mockery;%0D%0Aimport org.junit.Test;%0D%0Aimport org.netmelody.cieye.server.response.resource.RedirectResource;%0D%0Aimport org.simpleframework.http.Request;%0D%0Aimport org.simpleframework.http.Response;%0D%0A%0D%0Apublic final class RedirectResourceTest %7B%0D%0A%0D%0A    private final Mockery context = new Mockery();%0D%0A    %0D%0A    private final Request request = context.mock(Request.class);%0D%0A    private final Response response = context.mock(Response.class);%0D%0A    %0D%0A    private final RedirectResource redirect = new RedirectResource(%22myNewLocation%22);%0D%0A    %0D%0A    @Test public void%0D%0A    createsAValidHttpMovedPermanentlyResponse() throws Exception %7B%0D%0A        context.checking(new Expectations() %7B%7B%0D%0A            oneOf(response).setCode(301);%0D%0A            oneOf(response).setText(%22Moved Permanently%22);%0D%0A            oneOf(response).set(%22Location%22, %22myNewLocation%22);%0D%0A            %0D%0A            ignoring(response).close();%0D%0A        %7D%7D);%0D%0A        %0D%0A        redirect.handle(request, response);%0D%0A        context.assertIsSatisfied();%0D%0A    %7D%0D%0A    %0D%0A    @Test public void%0D%0A    closesTheResource() throws Exception %7B%0D%0A        context.checking(new Expectations() %7B%7B%0D%0A            oneOf(response).close();%0D%0A            %0D%0A            ignoring(response);%0D%0A        %7D%7D);%0D%0A        %0D%0A        redirect.handle(request, response);%0D%0A        context.assertIsSatisfied();%0D%0A    %7D%0D%0A%7D%0D%0A

add unit test for RedirectResource