Index: src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/AvailablePartiesUpdaterTest.java	(revision 1)
@@ -31,5 +31,4 @@
 
 public class AvailablePartiesUpdaterTest {
-	private static final String RANDOMPARTY = "src/main/webapp/partiesrepo/randomparty-2.1.6.jar";
 	private static final int TESTRATE = 200; // check file changes every 200ms
 	@SuppressWarnings("unchecked")
@@ -123,7 +122,6 @@
 		assertTrue(logrecords.get(0).getMessage()
 				.contains("Can not load class from file"));
-		// someone changed the error message deep down.
-		// assertTrue(logrecords.get(0).getThrown().getMessage().contains("error
-		// in opening zip file"));
+		assertTrue(logrecords.get(0).getThrown().getMessage()
+				.contains("error in opening zip file"));
 
 	}
@@ -148,5 +146,6 @@
 	public void randomPartyJarTest() throws IOException, InterruptedException {
 		init();
-		Files.copy(Paths.get(RANDOMPARTY), tmpdir.resolve(RNDPARTY));
+		Files.copy(Paths.get("target/jars/randomparty-1.0.0.jar"),
+				tmpdir.resolve(RNDPARTY));
 
 		Thread.sleep(2 * TESTRATE);
@@ -158,5 +157,5 @@
 	public void removeJarTest() throws IOException, InterruptedException {
 		init();
-		Files.copy(Paths.get(RANDOMPARTY), RNDPARTY);
+		Files.copy(Paths.get("target/jars/randomparty-1.0.0.jar"), RNDPARTY);
 		Thread.sleep(2 * TESTRATE);
 		assertEquals(1, repo.list().size());
@@ -170,5 +169,5 @@
 	public void removeRootTest() throws IOException, InterruptedException {
 		init();
-		Files.copy(Paths.get(RANDOMPARTY), RNDPARTY);
+		Files.copy(Paths.get("target/jars/randomparty-1.0.0.jar"), RNDPARTY);
 		Thread.sleep(2 * TESTRATE);
 		assertEquals(1, repo.list().size());
Index: src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java
===================================================================
--- src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/EmbeddedTomcat.java	(revision 1)
@@ -11,6 +11,5 @@
 	public void start() {
 		try {
-			// If I don't want to copy files around then the base directory must
-			// be '.'
+			// If I don't want to copy files around then the base directory must be '.'
 			String baseDir = ".";
 			tomcat.setPort(8080);
@@ -30,33 +29,21 @@
 			tomcat.destroy();
 			// Tomcat creates a work folder where the temporary files are stored
+			// FileUtils.deleteDirectory(new File("work"));
 		} catch (LifecycleException e) {
 			throw new RuntimeException(e);
+//		} catch (IOException e) {
+//			throw new RuntimeException(e);
 		}
 	}
 
-	/**
-	 * Deploys the webapp contained in this project
-	 * 
-	 * @param appName the name to use on the server
-	 */
 	public void deploy(String appName) {
-		deployWar(appName, new File("src/main/webapp"));
-	}
-
-	/**
-	 * Deploys the webapp in the given war
-	 * 
-	 * @param appName the name to use on the server
-	 * @param warfile the warfile to deploy. Should include ".war" extension.
-	 */
-	public void deployWar(String appName, File warfile) {
-		tomcat.addWebapp(tomcat.getHost(), "/" + appName,
-				warfile.getAbsolutePath());
-
+		// tomcat.addWebapp(tomcat.getHost(), "/" + appName, new
+		// File("src/main/webapp").getAbsolutePath());
+		tomcat.addWebapp(tomcat.getHost(), "/" + appName, new File("src/main/webapp").getAbsolutePath());
 	}
 
 	public String getApplicationUrl(String appName) {
-		return String.format("http://%s:%d/%s", tomcat.getHost().getName(),
-				tomcat.getConnector().getLocalPort(), appName);
+		return String.format("http://%s:%d/%s", tomcat.getHost().getName(), tomcat.getConnector().getLocalPort(),
+				appName);
 	}
 }
Index: src/test/java/geniusweb/partiesserver/JavaClient.java
===================================================================
--- src/test/java/geniusweb/partiesserver/JavaClient.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/JavaClient.java	(revision 1)
@@ -12,5 +12,5 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-import geniusweb.inform.Inform;
+import geniusweb.party.inform.Inform;
 
 /**
Index: src/test/java/geniusweb/partiesserver/JavaClientTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/JavaClientTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/JavaClientTest.java	(revision 1)
@@ -25,9 +25,8 @@
 
 import geniusweb.actions.PartyId;
-import geniusweb.inform.Settings;
-import geniusweb.inform.YourTurn;
+import geniusweb.party.inform.Settings;
+import geniusweb.party.inform.YourTurn;
 import geniusweb.progress.Progress;
 import geniusweb.progress.ProgressRounds;
-import geniusweb.references.Parameters;
 import geniusweb.references.ProfileRef;
 import geniusweb.references.ProtocolRef;
@@ -39,5 +38,6 @@
  */
 public class JavaClientTest {
-	private static final String RANDOMPARTY = "http://localhost:8080/partiesserver/run/randomparty-2.1.6";
+//	private static final String JSON = "{\"jobs\":[\"jobs1\"]}";
+//	private static final String JOBS1PROFILE = "{\"LinearAdditiveUtilitySpace\":{\"issueUtilities\":{\"lease car\":{\"discreteutils\":{\"valueUtilities\":{\"no\":0,\"yes\":1}}},\"permanent contract\":{\"discreteutils\":{\"valueUtilities\":{\"no\":0,\"yes\":1}}},\"career development opportunities\":{\"discreteutils\":{\"valueUtilities\":{\"high\":1,\"low\":0,\"medium\":0.5}}},\"fte\":{\"discreteutils\":{\"valueUtilities\":{\"1.0\":0.75,\"0.6\":0.25,\"0.8\":0.5}}},\"salary\":{\"discreteutils\":{\"valueUtilities\":{\"4000\":1.0,\"2500\":0.25,\"3500\":0.75,\"2000\":0,\"3000\":0.3}}},\"work from home\":{\"discreteutils\":{\"valueUtilities\":{\"1\":0.5,\"2\":0.666666666666,\"0\":0.333333333}}}},\"issueWeights\":{\"lease car\":0.06,\"permanent contract\":0.16,\"career development opportunities\":0.04,\"fte\":0.32,\"salary\":0.24,\"work from home\":0.18},\"domain\":{\"name\":\"jobs\",\"issuesValues\":{\"lease car\":{\"values\":[\"yes\",\"no\"]},\"permanent contract\":{\"values\":[\"yes\",\"no\"]},\"career development opportunities\":{\"values\":[\"low\",\"medium\",\"high\"]},\"fte\":{\"values\":[\"0.6\",\"0.8\",\"1.0\"]},\"salary\":{\"values\":[\"2000\",\"2500\",\"3000\",\"3500\",\"4000\"]},\"work from home\":{\"values\":[\"0\",\"1\",\"2\"]}}},\"name\":\"jobs1\"}}";
 	private EmbeddedTomcat tomcat = new EmbeddedTomcat();
 	private JavaClient client = new JavaClient();
@@ -59,5 +59,4 @@
 	public void after() throws Throwable {
 		Thread.sleep(2000);
-		System.setSecurityManager(null);
 		tomcat.stop();
 	}
@@ -113,4 +112,39 @@
 	}
 
+//	@Test
+//	public void testGetList() throws IOException, InterruptedException, WebSocketException {
+//		final List<String> received = new LinkedList<>();
+//		Thread.sleep(5000);
+//		WebSocketFactory factory = new WebSocketFactory().setConnectionTimeout(20000);
+//		WebSocket ws = factory.createSocket("ws://localhost:8080/profilesserver/websocket/liststream");
+//
+//		ws.addListener(new WebSocketAdapter() {
+//			@Override
+//			public void onTextMessage(WebSocket websocket, String message) throws Exception {
+//				System.out.println("received message: " + message);
+//				received.add(message);
+//			}
+//		});
+//		ws.connect();
+//		assertTrue(ws.isOpen());
+//
+//		Thread.sleep(2000);
+//		assertEquals(1, received.size());
+//		assertEquals(JSON, received.get(0));
+//	}
+//
+//	@Test
+//	public void testExample() throws WebSocketException, InterruptedException, IOException {
+//		DownloadProfileExample test = new DownloadProfileExample();
+//		test.run();
+//		assertEquals(JOBS1PROFILE, test.getReceived());
+//	}
+//
+//	@Test
+//	public void testExample2() throws WebSocketException, InterruptedException, IOException {
+//		DownloadProfileExample2 test = new DownloadProfileExample2();
+//		assertEquals(JOBS1PROFILE, test.getReceived());
+//	}
+
 	/**
 	 * @return URL on which to contact the party
@@ -122,5 +156,6 @@
 	 */
 	private String startParty() throws IOException, InterruptedException {
-		URL url = new URL(RANDOMPARTY);
+		URL url = new URL(
+				"http://localhost:8080/partiesserver/run/randomparty-1.0.0");
 		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
 		conn.setRequestMethod("GET");
@@ -146,6 +181,5 @@
 		connectParty();
 		Thread.sleep(1000);
-		Settings settings = new Settings(partyid, profile, protocol, progress,
-				new Parameters());
+		Settings settings = new Settings(partyid, profile, protocol, progress);
 		client.sendMessage(settings);
 	}
Index: src/test/java/geniusweb/partiesserver/RunningPartiesUpdaterTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/RunningPartiesUpdaterTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/RunningPartiesUpdaterTest.java	(revision 1)
@@ -13,4 +13,5 @@
 
 import geniusweb.actions.PartyId;
+import geniusweb.partiesserver.RunningPartiesUpdater;
 import geniusweb.partiesserver.repository.RunningPartiesRepo;
 import geniusweb.partiesserver.repository.RunningParty;
@@ -38,6 +39,5 @@
 		updater.update();
 		verify(repo, times(0)).remove(id);
-		// we also need to account for the kill delay
-		Thread.sleep(400 + RunningPartiesUpdater.KILL_DELAY);
+		Thread.sleep(400 + 2000); // there is 2000 extra kill wait time
 		updater.update();
 		verify(repo, times(1)).remove(id);
Index: src/test/java/geniusweb/partiesserver/repository/AvailablePartyTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/repository/AvailablePartyTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/repository/AvailablePartyTest.java	(revision 1)
@@ -6,7 +6,7 @@
 import org.junit.Before;
 
-import geniusweb.inform.Inform;
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
+import geniusweb.party.inform.Inform;
 import tudelft.utilities.junit.GeneralTests;
 
@@ -17,7 +17,7 @@
 	@Before
 	public void before() throws ClassNotFoundException {
-		party1 = new AvailableJavaParty("party1", Party1.class);
-		party1a = new AvailableJavaParty("party1", Party1.class);
-		party2 = new AvailableJavaParty("party2", Party2.class);
+		party1 = new AvailableParty("party1", Party1.class);
+		party1a = new AvailableParty("party1", Party1.class);
+		party2 = new AvailableParty("party2", Party2.class);
 
 	}
Index: src/test/java/geniusweb/partiesserver/repository/RunningPartyTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/repository/RunningPartyTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/repository/RunningPartyTest.java	(revision 1)
@@ -16,10 +16,13 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 
+import geniusweb.actions.Action;
 import geniusweb.actions.PartyId;
-import geniusweb.inform.Inform;
-import geniusweb.partiesserver.websocket.PartySocket;
+import geniusweb.connection.DefaultConnection;
+import geniusweb.partiesserver.repository.AvailableParty;
+import geniusweb.partiesserver.repository.RunningParty;
 import geniusweb.party.Capabilities;
 import geniusweb.party.DefaultParty;
 import geniusweb.party.Party;
+import geniusweb.party.inform.Inform;
 import tudelft.utilities.junit.GeneralTests;
 
@@ -63,7 +66,7 @@
 
 	@Test
-	public void constructor2Test()
-			throws ClassNotFoundException, InstantiationFailedException {
-		AvailableParty availableParty = new AvailableJavaParty("simple  party",
+	public void constructor2Test() throws InstantiationException,
+			IllegalAccessException, ClassNotFoundException {
+		AvailableParty availableParty = new AvailableParty("simple  party",
 				SimpleParty.class);
 		// mocking AvailableParty gives troubles with implemening
@@ -87,5 +90,6 @@
 		RunningParty rparty = new RunningParty(party1, id1, "name1", now, end,
 				null);
-		PartySocket connection = mock(PartySocket.class);
+		DefaultConnection<Inform, Action> connection = mock(
+				DefaultConnection.class);
 		rparty = rparty.withConnection(connection);
 	}
@@ -95,5 +99,6 @@
 		RunningParty rparty = new RunningParty(party1, id1, "name1", now, end,
 				null);
-		PartySocket connection = mock(PartySocket.class);
+		DefaultConnection<Inform, Action> connection = mock(
+				DefaultConnection.class);
 		rparty = rparty.withConnection(connection);
 		rparty = rparty.withConnection(connection);
@@ -107,5 +112,6 @@
 		RunningParty rparty = new RunningParty(party1, id1, "name1", now, end,
 				null);
-		PartySocket connection = mock(PartySocket.class);
+		DefaultConnection<Inform, Action> connection = mock(
+				DefaultConnection.class);
 		rparty = rparty.withConnection(connection);
 
@@ -114,26 +120,7 @@
 
 		ArgumentCaptor<Inform> argument = ArgumentCaptor.forClass(Inform.class);
-		verify(connection, times(1)).notifyListeners(argument.capture());
+		verify(connection, times(1)).notifyChange(argument.capture());
 		assertEquals(info, argument.getValue());
 	}
-
-	@Test
-	public void testSquash() {
-		assertEquals("12__3", running1.squash("12&$3"));
-	}
-
-	@Test
-	public void testSquash1() {
-		assertEquals("p12__3", running1.squash1("12&$3"));
-		assertEquals("party_32_12", running1.squash1("party+32=12"));
-		assertEquals("party_32_12", running1.squash1("party 32 12"));
-	}
-
-	@Test
-	public void testWeirdNames() {
-		new RunningParty(party1, id1, "bla#@12- @1/3", now, end, null);
-		new RunningParty(party1, id1, "12-bla#@12- @1/3", now, end, null);
-	}
-
 }
 
Index: src/test/java/geniusweb/partiesserver/websocket/GeneralPartyInfoTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/websocket/GeneralPartyInfoTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/websocket/GeneralPartyInfoTest.java	(revision 1)
@@ -9,5 +9,4 @@
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import org.junit.Before;
@@ -19,5 +18,5 @@
 import geniusweb.partiesserver.repository.GeneralPartyInfo;
 import geniusweb.party.Capabilities;
-import geniusweb.profile.Profile;
+import geniusweb.references.ProtocolRef;
 import tudelft.utilities.junit.GeneralTests;
 
@@ -26,6 +25,6 @@
 	private URI iri1;
 	private URI iri2;
-	private HashSet<String> protocols1;
-	private HashSet<String> protocols2;
+	private HashSet protocols1;
+	private HashSet protocols2;
 	private Capabilities caps1;
 	private Capabilities caps2;
@@ -37,17 +36,11 @@
 	private GeneralPartyInfo info3;
 	private GeneralPartyInfo info4;
-	private String text1 = "GeneralPartyInfo.*iri1,Capabilities.*Profile.*SAOP.*description 1.*";
-	private String text2 = "GeneralPartyInfo.*iri2,Capabilities.*Profile.*SAOP.*,description 1.*";
-	private String text3 = "GeneralPartyInfo.*iri1,Capabilities.*Profile.*SEB.*,description 1.*";
-	private String text4 = "GeneralPartyInfo.*iri1,Capabilities.*Profile.*SAOP.*,description 2.*";
+	private String text1 = "GeneralPartyInfo.*iri1,Capabilities.*Protocols=.*ProtocolRef.*protocol1.*,description 1.*";
+	private String text2 = "GeneralPartyInfo.*iri2,Capabilities.*Protocols=.*ProtocolRef.*protocol1.*,description 1.*";
+	private String text3 = "GeneralPartyInfo.*iri1,Capabilities.*Protocols=.*ProtocolRef.*protocol2.*,description 1.*";
+	private String text4 = "GeneralPartyInfo.*iri1,Capabilities.*Protocols=.*ProtocolRef.*protocol1.*,description 2.*";
 
 	private final ObjectMapper jackson = new ObjectMapper();
-	private String serialized = "{\"uri\":\"http://iri1\",\"capabilities\":{\"behaviours\":[\"SAOP\"],\"profiles\":[\"geniusweb.profile.Profile\"]},\"description\":\"description 1\"}";
-
-	@SuppressWarnings("rawtypes")
-	public void test() {
-		Object a = 1;
-		List l = (List) a;
-	}
+	private String serialized = "{\"uri\":\"http://iri1\",\"capabilities\":{\"protocols\":[\"http://protocol1\"]},\"description\":\"description 1\"}";
 
 	@Before
@@ -55,10 +48,10 @@
 		iri1 = new URI("http://iri1");
 		iri2 = new URI("http://iri2");
-		protocols1 = new HashSet<>(Arrays.asList("SAOP"));
-		protocols2 = new HashSet<>(Arrays.asList("SEB"));
-		Set<Class<? extends Profile>> profilesclasses = new HashSet<>(
-				Arrays.asList(Profile.class));
-		caps1 = new Capabilities(protocols1, profilesclasses);
-		caps2 = new Capabilities(protocols2, profilesclasses);
+		protocols1 = new HashSet<>(
+				Arrays.asList(new ProtocolRef("http://protocol1")));
+		protocols2 = new HashSet<>(
+				Arrays.asList(new ProtocolRef("http://protocol2")));
+		caps1 = new Capabilities(protocols1);
+		caps2 = new Capabilities(protocols2);
 		descr1 = "description 1";
 		descr2 = "description 2";
@@ -97,4 +90,3 @@
 		assertEquals(serialized, string);
 	}
-
 }
Index: src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java
===================================================================
--- src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java	(revision 46)
+++ src/test/java/geniusweb/partiesserver/websocket/PartySocketTest.java	(revision 1)
@@ -23,10 +23,11 @@
 import geniusweb.actions.EndNegotiation;
 import geniusweb.actions.PartyId;
-import geniusweb.connection.ConnectionEnd;
-import geniusweb.inform.Inform;
-import geniusweb.inform.YourTurn;
+import geniusweb.connection.Connection;
 import geniusweb.partiesserver.repository.RunningPartiesRepo;
 import geniusweb.partiesserver.repository.RunningParty;
+import geniusweb.partiesserver.websocket.PartySocket;
 import geniusweb.party.Party;
+import geniusweb.party.inform.Inform;
+import geniusweb.party.inform.YourTurn;
 import tudelft.utilities.logging.Reporter;
 
@@ -82,5 +83,5 @@
 
 		@SuppressWarnings("unchecked")
-		ConnectionEnd<Inform, Action> connection = mock(ConnectionEnd.class);
+		Connection<Inform, Action> connection = mock(Connection.class);
 		/*
 		 * we must call runningparty directly on this one because
@@ -119,5 +120,5 @@
 
 		Inform info = new YourTurn();
-		socket.onMessage(jackson.writeValueAsString(info), true,session);
+		socket.onMessage(jackson.writeValueAsString(info), session);
 		// check that party.inform was actually called with YourTurn
 		verify(runningparty1, times(1)).inform(argument.capture());
@@ -142,5 +143,5 @@
 		ArgumentCaptor<String> argument = ArgumentCaptor.forClass(String.class);
 		verify(basicremote, times(1)).sendText(argument.capture());
-		assertEquals("{\"EndNegotiation\":{\"actor\":\"party1\"}}",
+		assertEquals("{\"endnegotiation\":{\"actor\":\"party1\"}}",
 				argument.getValue());
 	}
