diff --git a/mispadapter/mispadapter.iml b/mispadapter/mispadapter.iml
index 88b270d..5ec3e18 100644
--- a/mispadapter/mispadapter.iml
+++ b/mispadapter/mispadapter.iml
@@ -8,7 +8,7 @@
-
+
\ No newline at end of file
diff --git a/mispadapter/src/com/olexyn/mispl/adapter/Adapter.java b/mispadapter/src/com/olexyn/misp/adapter/Adapter.java
similarity index 97%
rename from mispadapter/src/com/olexyn/mispl/adapter/Adapter.java
rename to mispadapter/src/com/olexyn/misp/adapter/Adapter.java
index 1acd046..021c7e3 100644
--- a/mispadapter/src/com/olexyn/mispl/adapter/Adapter.java
+++ b/mispadapter/src/com/olexyn/misp/adapter/Adapter.java
@@ -1,12 +1,11 @@
-package com.olexyn.mispl.adapter;
+package com.olexyn.misp.adapter;
+
-import com.olexyn.misp.client.ConnectionHelper;
import com.olexyn.misp.helper.Ride;
import javax.servlet.ServletException;
import java.io.DataOutputStream;
import java.io.IOException;
-import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Map;
@@ -15,7 +14,7 @@ import java.util.Map;
public class Adapter {
protected static final String MISP_BRIDGE_URL = "http://localhost:9090/mispbridge/core";
- protected static final String APP_URL = "http://localhost:9090/mispclient";
+ protected static final String APP_URL = "http://localhost:9090/mirror/core";
public static final int AVAILABLE_RIDES_OVERHEAD_TRIGGER = 2;
public static final int AVAILABLE_RIDES_OVERHEAD = 4;
diff --git a/mispclient/src/com/olexyn/misp/client/ConnectionHelper.java b/mispadapter/src/com/olexyn/misp/adapter/ConnectionHelper.java
similarity index 95%
rename from mispclient/src/com/olexyn/misp/client/ConnectionHelper.java
rename to mispadapter/src/com/olexyn/misp/adapter/ConnectionHelper.java
index 1220408..4d53798 100644
--- a/mispclient/src/com/olexyn/misp/client/ConnectionHelper.java
+++ b/mispadapter/src/com/olexyn/misp/adapter/ConnectionHelper.java
@@ -1,4 +1,4 @@
-package com.olexyn.misp.client;
+package com.olexyn.misp.adapter;
import com.olexyn.misp.helper.Ride;
@@ -7,6 +7,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
+import org.json.JSONObject;
public class ConnectionHelper {
diff --git a/mispadapter/src/com/olexyn/mispl/adapter/Main.java b/mispadapter/src/com/olexyn/misp/adapter/Main.java
similarity index 70%
rename from mispadapter/src/com/olexyn/mispl/adapter/Main.java
rename to mispadapter/src/com/olexyn/misp/adapter/Main.java
index 6afa208..18ef129 100644
--- a/mispadapter/src/com/olexyn/mispl/adapter/Main.java
+++ b/mispadapter/src/com/olexyn/misp/adapter/Main.java
@@ -1,4 +1,4 @@
-package com.olexyn.mispl.adapter;
+package com.olexyn.misp.adapter;
public class Main {
diff --git a/mispmock/src/com/olexyn/misp/mock/AdapterMock.java b/mispmock/src/com/olexyn/misp/mock/AdapterMock.java
index 0f7adbb..f8cfe9b 100644
--- a/mispmock/src/com/olexyn/misp/mock/AdapterMock.java
+++ b/mispmock/src/com/olexyn/misp/mock/AdapterMock.java
@@ -1,9 +1,8 @@
package com.olexyn.misp.mock;
-import com.olexyn.misp.client.ClientServlet;
import com.olexyn.misp.helper.Ride;
import com.olexyn.misp.mock.exchange.ExchangeMock;
-import com.olexyn.mispl.adapter.Adapter;
+import com.olexyn.misp.adapter.Adapter;
import javax.servlet.ServletException;
import java.io.IOException;
diff --git a/mispmock/src/com/olexyn/misp/mock/ClientMock.java b/mispmock/src/com/olexyn/misp/mock/ClientMock.java
deleted file mode 100644
index 0595a38..0000000
--- a/mispmock/src/com/olexyn/misp/mock/ClientMock.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.olexyn.misp.mock;
-
-import com.olexyn.misp.client.ClientServlet;
-import com.olexyn.misp.helper.Ride;
-import com.olexyn.misp.mock.exchange.ExchangeMock;
-
-
-import javax.servlet.ServletException;
-import java.io.IOException;
-
-
-/**
- * Wraps a ClientServlet so it can be debugged easily, i.e. without running Tomcat.
- */
-public class ClientMock extends ClientServlet {
-
- private MockSet mockSet;
-
-
- public ClientMock(MockSet mockSet) {
- super();
- mockSet.clientMock = this;
- this.mockSet = mockSet;
- }
-
- /**
- * Send POST (Ride).
- * Parse response.
- */
- @Override
- protected Ride doSendPostRide(Ride ride) throws IOException, ServletException, InterruptedException {
-
- // Mock Exchange
- final ExchangeMock exchange = new ExchangeMock();
- exchange.request.setMethod("POST");
- exchange.request.setContentType("application/json");
- exchange.request.setContent(ride.json().getBytes());
-
- synchronized (exchange) {
- // Mock POST (Ride)
- exchange.notify();
- mockSet.bridgeMock.doPost(exchange.request, exchange.response);
- exchange.wait();
- exchange.notify();
- }
-
- // handle OK (Ride)(Request)
- return new Ride(exchange.response.getContentAsString());
- }
-
-
- /**
- * Send GET (Request) to App.
- * Parse response.
- */
- @Override
- protected String doSendGetRequest(String request) throws IOException, InterruptedException {
-
- // Mock Exchange
- final ExchangeMock exchange = new ExchangeMock();
-
- exchange.request.setMethod("GET");
- exchange.request.setContent(request.getBytes());
-
- synchronized (exchange) {
- // Mock GET (Request)
- exchange.notify();
- mockSet.appMock.doGet(exchange.request, exchange.response);
-
- // handle OK (Data)
- exchange.notify();
- }
-
- return exchange.response.getContentAsString();
- }
-
-
- /**
- * Send GET (Ride)(Request)(Data).
- * Parse response.
- */
- @Override
- protected void doSendGetRideRequest(Ride ride) throws IOException, InterruptedException {
-
- // Mock Exchange
- final ExchangeMock exchange = new ExchangeMock();
- exchange.request.setMethod("GET");
- exchange.request.setContentType("application/json");
- exchange.request.setContent(ride.json().getBytes());
-
- synchronized (exchange) {
- // Mock GET (Ride)(Request)(Data)
- exchange.notify();
- mockSet.bridgeMock.doGet(exchange.request, exchange.response);
- exchange.wait();
- exchange.notify();
- }
- }
-
-}
\ No newline at end of file
diff --git a/mispmock/src/com/olexyn/misp/mock/ClientRunnable.java b/mispmock/src/com/olexyn/misp/mock/ClientRunnable.java
deleted file mode 100644
index 79e4b41..0000000
--- a/mispmock/src/com/olexyn/misp/mock/ClientRunnable.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.olexyn.misp.mock;
-
-/**
- * Pass the MockSet.
- * Provide a Runnable.
- */
-public class ClientRunnable implements Runnable {
-
- private MockSet mockSet;
-
- public ClientRunnable(MockSet mockSet){
- super();
- this.mockSet = mockSet;
- }
-
- @Override
- public void run() {
- new ClientMock(mockSet);
- }
-}
diff --git a/mispmock/src/com/olexyn/misp/mock/MockSet.java b/mispmock/src/com/olexyn/misp/mock/MockSet.java
index a431c67..533a1ec 100644
--- a/mispmock/src/com/olexyn/misp/mock/MockSet.java
+++ b/mispmock/src/com/olexyn/misp/mock/MockSet.java
@@ -7,6 +7,5 @@ public class MockSet {
public UserMock userMock;
public BridgeMock bridgeMock;
public AdapterMock adapterMock;
- public ClientMock clientMock;
public AppMock appMock;
}
\ No newline at end of file