@@ -0,0 +1,1400 @@
+import com.thoughtworks.go.plugin.api.task.JobConsoleLogger;%0Aimport com.tw.go.plugin.common.Context;%0Aimport java.util.Map;%0Aimport com.tw.go.task.fortify.FortifyRequest;%0Aimport com.tw.go.task.fortify.FortifyTaskExecutor;%0A%0Aimport org.json.JSONArray;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.security.GeneralSecurityException;%0A%0Apublic class FortifyTest%0A%7B%0A    FortifyRequest request;%0A%0A    @Before%0A    public void init() throws GeneralSecurityException%0A    %7B%0A        request = new FortifyRequest(%22%22, %22%22, %22%22, true);%0A        request.setUsername(%22user%22);%0A        request.setPassword(%22password%22);%0A        request.setSscProject(%22project%22);%0A        request.setSscVersion(%22version%22);%0A    %7D%0A%0A    @Test%0A    public void requestPropertiesTest() throws GeneralSecurityException%0A    %7B%0A        assertEquals(%22user%22, request.getUsername());%0A        assertEquals(%22password%22, request.getPassword());%0A        assertEquals(%22project%22, request.getSscProject());%0A        assertEquals(%22version%22, request.getSscVersion());%0A    %7D%0A%0A    @Test public void getRequestTest()%0A    %7B%0A        assertEquals(true, !%22%22.equals(request.request(%22GET%22, %22https://httpbin.org/get%22, %22%22)));%0A    %7D%0A%0A    @Test public void postRequestTest()%0A    %7B%0A        assertEquals(true, !%22%22.equals(request.request(%22POST%22, %22http://posttestserver.com/post.php%22, %22%22)));%0A    %7D%0A%7D

Test for Fortify plugin