Index: protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACStateTest.java
===================================================================
--- protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACStateTest.java	(revision 38)
+++ protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACStateTest.java	(revision 39)
@@ -74,5 +74,5 @@
 	private MOPACState state1, state1a, state2, state3, state4, state5, state6;
 
-	private String serialized = "{\"MOPACState\":{\"phase\":{\"OfferPhase\":{\"partyStates\":{\"powers\":{},\"notYetActed\":[],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"evaluator\":{\"LargestAgreement\":{}},\"deadline\":100}},\"actions\":[],\"progress\":{\"ProgressTime\":{\"duration\":100,\"start\":1001}},\"settings\":{\"MOPACSettings\":{\"participants\":[{\"TeamInfo\":{\"parties\":[{\"party\":{\"partyref\":\"http://party1\",\"parameters\":{}},\"profile\":\"http://profile1\"}]}},{\"TeamInfo\":{\"parties\":[{\"party\":{\"partyref\":\"http://party2\",\"parameters\":{}},\"profile\":\"http://profile2\"}]}}],\"deadline\":{\"DeadlineTime\":{\"durationms\":100}},\"votingevaluator\":{\"LargestAgreement\":{}}}},\"partyprofiles\":{}}}";
+	private String serialized = "{\"MOPACState\":{\"phase\":{\"OfferPhase\":{\"partyStates\":{\"powers\":{},\"notYetActed\":[],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"deadline\":100,\"evaluator\":{\"LargestAgreement\":{}}}},\"actions\":[],\"progress\":{\"ProgressTime\":{\"duration\":100,\"start\":1001}},\"settings\":{\"MOPACSettings\":{\"participants\":[{\"TeamInfo\":{\"parties\":[{\"party\":{\"partyref\":\"http://party1\",\"parameters\":{}},\"profile\":\"http://profile1\"}]}},{\"TeamInfo\":{\"parties\":[{\"party\":{\"partyref\":\"http://party2\",\"parameters\":{}},\"profile\":\"http://profile2\"}]}}],\"deadline\":{\"DeadlineTime\":{\"durationms\":100}},\"votingevaluator\":{\"LargestAgreement\":{}}}},\"partyprofiles\":{}}}";
 
 	@Before
@@ -187,4 +187,6 @@
 				.thenReturn(new Date(Phase.PHASE_MAXTIME)); // plenty for new
 															// phase
+		when(progress.isPastDeadline(10 + Phase.PHASE_MINTIME))
+				.thenReturn(false);
 		Map<PartyId, PartyWithProfile> partyprofiles = mock(Map.class);
 		MOPACState s1 = new MOPACState(phase, actions, progress, settings,
Index: protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACTest.java
===================================================================
--- protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACTest.java	(revision 38)
+++ protocol/src/test/java/geniusweb/protocol/session/mopac/MOPACTest.java	(revision 39)
@@ -5,6 +5,6 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
@@ -14,4 +14,5 @@
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
@@ -189,4 +190,5 @@
 		when(finalofferstate.getPhase()).thenReturn(finalofferphase);
 		when(finalofferstate.finishPhase()).thenReturn(finalofferstate);
+		when(finalofferstate.isFinal(anyLong())).thenReturn(false);
 
 		when(offerstate.with(any(PartyId.class), any(Action.class), anyLong()))
@@ -198,5 +200,8 @@
 		MOPACState votingstate = mock(MOPACState.class);
 		Phase votingphase = mock(VotingPhase.class);
+
 		PartyStates votingpartystates = mock(PartyStates.class);
+		when(votingpartystates.getNotYetActed())
+				.thenReturn(Collections.emptySet());
 		when(votingphase.getDeadline()).thenReturn(now + 100);
 		when(votingphase.getPartyStates()).thenReturn(votingpartystates);
Index: protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OfferPhaseTest.java
===================================================================
--- protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OfferPhaseTest.java	(revision 38)
+++ protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OfferPhaseTest.java	(revision 39)
@@ -57,5 +57,5 @@
 	private final Offer offer = new Offer(party1, bid);
 
-	private final String serialized = "{\"OfferPhase\":{\"partyStates\":{\"powers\":{\"party2\":3,\"party1\":2,\"party3\":3},\"notYetActed\":[\"party2\",\"party1\",\"party3\"],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"evaluator\":{\"LargestAgreement\":{}},\"deadline\":10}}";
+	private final String serialized = "{\"OfferPhase\":{\"partyStates\":{\"powers\":{\"party2\":3,\"party1\":2,\"party3\":3},\"notYetActed\":[\"party2\",\"party1\",\"party3\"],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"deadline\":10,\"evaluator\":{\"LargestAgreement\":{}}}}";
 
 	public OfferPhaseTest() {
Index: protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OptInPhaseTest.java
===================================================================
--- protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OptInPhaseTest.java	(revision 38)
+++ protocol/src/test/java/geniusweb/protocol/session/mopac/phase/OptInPhaseTest.java	(revision 39)
@@ -7,4 +7,6 @@
 import static org.mockito.Mockito.when;
 
+import java.io.IOException;
+import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.Collections;
@@ -14,4 +16,7 @@
 
 import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 import geniusweb.actions.EndNegotiation;
@@ -33,4 +38,5 @@
  */
 public class OptInPhaseTest extends GeneralTests<OptInPhase> {
+	private final ObjectMapper jackson = new ObjectMapper();
 
 	private static final long DEADLINE = 10l;
@@ -53,4 +59,6 @@
 
 	private final List<Votes> prevVotes = Arrays.asList(votes);
+
+	private final String serialized = "{\"OptInPhase\":{\"votes\":[],\"partyStates\":{\"powers\":{\"party2\":3,\"party1\":2,\"party3\":3},\"notYetActed\":[\"party2\",\"party1\",\"party3\"],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"deadline\":10,\"evaluator\":{\"LargestAgreement\":{}}}}";
 
 	public OptInPhaseTest() {
@@ -65,9 +73,14 @@
 		// in these phases we just don't set prevPhase.
 		// this to avoid serialization troubles.
-		phase1 = new OptInPhase(null, states, 10l, evaluator);
-		phase1a = new OptInPhase(null, states, 10l, evaluator);
-		phase2 = new OptInPhase(null, states2, 10l, evaluator);
-		phase3 = new OptInPhase(null, states, 20l, evaluator);
-		phase4 = new OptInPhase(null, states, 10l, evaluator2);
+		phase1 = new OptInPhase(Collections.emptyList(), states, 10l,
+				evaluator);
+		phase1a = new OptInPhase(Collections.emptyList(), states, 10l,
+				evaluator);
+		phase2 = new OptInPhase(Collections.emptyList(), states2, 10l,
+				evaluator);
+		phase3 = new OptInPhase(Collections.emptyList(), states, 20l,
+				evaluator);
+		phase4 = new OptInPhase(Collections.emptyList(), states, 10l,
+				evaluator2);
 
 	}
@@ -200,3 +213,19 @@
 	}
 
+	@Test
+	public void testDeserialize() throws IOException {
+		Phase obj = jackson.readValue(serialized, Phase.class);
+		System.out.println(obj);
+		assertEquals(phase1, obj);
+	}
+
+	@Test
+	public void testSerialize()
+			throws JsonProcessingException, URISyntaxException {
+
+		String string = jackson.writeValueAsString(phase1);
+		System.out.println(string);
+		assertEquals(serialized, string);
+	}
+
 }
Index: protocol/src/test/java/geniusweb/protocol/session/mopac/phase/VotingPhaseTest.java
===================================================================
--- protocol/src/test/java/geniusweb/protocol/session/mopac/phase/VotingPhaseTest.java	(revision 38)
+++ protocol/src/test/java/geniusweb/protocol/session/mopac/phase/VotingPhaseTest.java	(revision 39)
@@ -7,4 +7,6 @@
 import static org.mockito.Mockito.when;
 
+import java.io.IOException;
+import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.Collections;
@@ -14,4 +16,7 @@
 
 import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 import geniusweb.actions.EndNegotiation;
@@ -34,4 +39,5 @@
  */
 public class VotingPhaseTest extends GeneralTests<VotingPhase> {
+	private final ObjectMapper jackson = new ObjectMapper();
 
 	private static final long DEADLINE = 10l;
@@ -54,4 +60,5 @@
 
 	private final List<Offer> prevPhase = Arrays.asList(new Offer(party1, bid));
+	private final String serialized = "{\"VotingPhase\":{\"offers\":[],\"partyStates\":{\"powers\":{\"party2\":3,\"party1\":2,\"party3\":3},\"notYetActed\":[\"party2\",\"party1\",\"party3\"],\"actions\":[],\"agreements\":{},\"walkedAway\":[],\"exceptions\":{}},\"deadline\":10,\"evaluator\":{\"LargestAgreement\":{}}}}";
 
 	public VotingPhaseTest() {
@@ -66,9 +73,14 @@
 		// in these phases we just don't set prevPhase.
 		// this to avoid serialization troubles.
-		phase1 = new VotingPhase(null, states, 10l, evaluator);
-		phase1a = new VotingPhase(null, states, 10l, evaluator);
-		phase2 = new VotingPhase(null, states2, 10l, evaluator);
-		phase3 = new VotingPhase(null, states, 20l, evaluator);
-		phase4 = new VotingPhase(null, states, 10l, evaluator2);
+		phase1 = new VotingPhase(Collections.emptyList(), states, 10l,
+				evaluator);
+		phase1a = new VotingPhase(Collections.emptyList(), states, 10l,
+				evaluator);
+		phase2 = new VotingPhase(Collections.emptyList(), states2, 10l,
+				evaluator);
+		phase3 = new VotingPhase(Collections.emptyList(), states, 20l,
+				evaluator);
+		phase4 = new VotingPhase(Collections.emptyList(), states, 10l,
+				evaluator2);
 
 	}
@@ -192,3 +204,18 @@
 	}
 
+	@Test
+	public void testDeserialize() throws IOException {
+		Phase obj = jackson.readValue(serialized, Phase.class);
+		System.out.println(obj);
+		assertEquals(phase1, obj);
+	}
+
+	@Test
+	public void testSerialize()
+			throws JsonProcessingException, URISyntaxException {
+
+		String string = jackson.writeValueAsString(phase1);
+		System.out.println(string);
+		assertEquals(serialized, string);
+	}
 }
