package com.proxerme.library.util;

import android.support.test.InstrumentationRegistry;

import com.proxerme.library.connection.ProxerConnection;

import org.junit.AfterClass;
import org.junit.BeforeClass;

import java.io.IOException;

import okhttp3.mockwebserver.MockWebServer;

/**
 * Base class for all {@link com.proxerme.library.connection.ProxerRequest} subclass tests.
 *
 * @author Ruben Gees
 */
public class RequestTest {

    protected static MockWebServer server = new MockWebServer();
    protected static ProxerConnection connection = new ProxerConnection.Builder("test",
            InstrumentationRegistry.getContext()).build();

    protected RequestTest() {

    }

    @BeforeClass
    public static void setUpServer() throws IOException {
        server.start();
    }

    @AfterClass
    public static void tearDownServer() throws IOException {
        server.shutdown();
    }
}

@@ -163,21 +163,16 @@
 it.After
-Class
 ;%0Aimport
@@ -188,21 +188,16 @@
 t.Before
-Class
 ;%0A%0Aimpor
@@ -432,23 +432,16 @@
 otected 
-static 
 MockWebS
@@ -456,69 +456,194 @@
 rver
- = new MockWebServer();%0A    protected static ProxerConnection
+;%0A    protected ProxerConnection connection;%0A%0A    protected RequestTest() %7B%0A%0A    %7D%0A%0A    @Before%0A    public void setUp() throws IOException %7B%0A        server = new MockWebServer();%0A       
  con
@@ -701,16 +701,20 @@
         
+ 
+   
 Instrume
@@ -757,121 +757,8 @@
 );%0A%0A
-    protected RequestTest() %7B%0A%0A    %7D%0A%0A    @BeforeClass%0A    public static void setUpServer() throws IOException %7B%0A
     
@@ -798,13 +798,8 @@
 fter
-Class
 %0A   
@@ -810,15 +810,8 @@
 lic 
-static 
 void
@@ -819,22 +819,16 @@
 tearDown
-Server
 () throw

Fix tests by constructing a new server and connection in setup