Index: events/src/main/java/geniusweb/actions/Action.java
===================================================================
--- events/src/main/java/geniusweb/actions/Action.java	(revision 29)
+++ events/src/main/java/geniusweb/actions/Action.java	(revision 30)
@@ -18,5 +18,7 @@
 		@JsonSubTypes.Type(value = ElicitComparison.class),
 		@JsonSubTypes.Type(value = Vote.class),
-		@JsonSubTypes.Type(value = Votes.class) })
+		@JsonSubTypes.Type(value = Votes.class),
+		@JsonSubTypes.Type(value = VoteWithValue.class),
+		@JsonSubTypes.Type(value = VotesWithValue.class) })
 public interface Action {
 	/**
Index: events/src/main/java/geniusweb/actions/VoteWithValue.java
===================================================================
--- events/src/main/java/geniusweb/actions/VoteWithValue.java	(revision 30)
+++ events/src/main/java/geniusweb/actions/VoteWithValue.java	(revision 30)
@@ -0,0 +1,127 @@
+package geniusweb.actions;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import geniusweb.issuevalue.Bid;
+
+/**
+ * A vote is an indication by a party that it conditionally accepts a bid. It's
+ * then up to the protocol to determine the outcome.
+ */
+@JsonTypeName("votewithvalue")
+public class VoteWithValue extends ActionWithBid {
+	private final Integer minPower;
+	private final Integer maxPower;
+	private final Integer value;
+
+	/**
+	 * @param id       the {@link PartyId} that does the action
+	 * @param bid      the bid that is voted on
+	 * @param minPower the minimum power this bid must get in order for the vote
+	 *                 to be valid. Power is the sum of the powers of the
+	 *                 parties that are in the deal. If power=1 for all
+	 *                 participants (usually the default) power can be
+	 *                 interpreted as number of votes
+	 * @param maxPower the maximum power this bid must get in order for the vote
+	 *                 to be valid. See {@link #minPower}
+	 * @param value    the value for this vote. An integer in [1,100]. Higher
+	 *                 means that the actor likes this bid better. Note: value 0
+	 *                 is reserved for "unacceptable" and therefore can not be
+	 *                 used as a valid value.
+	 */
+	@JsonCreator
+	public VoteWithValue(@JsonProperty("actor") PartyId id,
+			@JsonProperty("bid") Bid bid,
+			@JsonProperty("minPower") Integer minPower,
+			@JsonProperty("maxPower") Integer maxPower,
+			@JsonProperty("value") Integer value) {
+		super(id, bid);
+		this.minPower = minPower;
+		this.maxPower = maxPower;
+		this.value = value;
+		if (value < 1 || value > 100)
+			throw new IllegalArgumentException(
+					"value must be in [1,100] but got " + value);
+		if (bid == null || minPower == null || minPower < 1 || maxPower == null
+				|| maxPower < minPower) {
+			throw new IllegalArgumentException(
+					"Vote must have non-null bid and minVotes, and minPower must be >=1 and maxPower must be >=minPower");
+		}
+	}
+
+	/**
+	 * 
+	 * @return the minimum power this bid must get in order for the vote to be
+	 *         valid.
+	 */
+	public Integer getMinPower() {
+		return minPower;
+	}
+
+	/**
+	 * 
+	 * @return the max power this bid must get in order for the vote to be
+	 *         valid.
+	 */
+	public Integer getMaxPower() {
+		return maxPower;
+	}
+
+	/**
+	 * 
+	 * @return the value for this vote. An integer in [1,100]. Higher means that
+	 *         the actor likes this bid better.
+	 * 
+	 */
+	public Integer getValue() {
+		return value;
+	}
+
+	@Override
+	public String toString() {
+		return "VoteWithValue[" + getActor() + "," + getBid() + "," + minPower
+				+ "," + maxPower + "," + value + "]";
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = super.hashCode();
+		result = prime * result
+				+ ((maxPower == null) ? 0 : maxPower.hashCode());
+		result = prime * result
+				+ ((minPower == null) ? 0 : minPower.hashCode());
+		result = prime * result + ((value == null) ? 0 : value.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (!super.equals(obj))
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		VoteWithValue other = (VoteWithValue) obj;
+		if (maxPower == null) {
+			if (other.maxPower != null)
+				return false;
+		} else if (!maxPower.equals(other.maxPower))
+			return false;
+		if (minPower == null) {
+			if (other.minPower != null)
+				return false;
+		} else if (!minPower.equals(other.minPower))
+			return false;
+		if (value == null) {
+			if (other.value != null)
+				return false;
+		} else if (!value.equals(other.value))
+			return false;
+		return true;
+	}
+
+}
Index: events/src/main/java/geniusweb/actions/VotesWithValue.java
===================================================================
--- events/src/main/java/geniusweb/actions/VotesWithValue.java	(revision 30)
+++ events/src/main/java/geniusweb/actions/VotesWithValue.java	(revision 30)
@@ -0,0 +1,125 @@
+package geniusweb.actions;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import geniusweb.issuevalue.Bid;
+
+/**
+ * Indicates that a party conditionally agrees with any of the
+ * {@link VoteWithValue}s provided.
+ */
+public class VotesWithValue extends AbstractAction {
+	private final Set<VoteWithValue> votes;
+
+	/**
+	 * 
+	 * @param id    party id
+	 * @param votes the {@link Vote}s that the party can agree on, if the
+	 *              condition of the Vote holds. Every {@link Vote#getActor()}
+	 *              should equal the id. The sum of the values must =100.
+	 */
+	@JsonCreator
+	public VotesWithValue(@JsonProperty("actor") PartyId id,
+			@JsonProperty("votes") Set<VoteWithValue> votes) {
+		super(id);
+		this.votes = votes;
+		if (votes == null)
+			throw new NullPointerException("votes must be not null");
+		for (VoteWithValue vote : votes) {
+			if (!vote.getActor().equals(id)) {
+				throw new IllegalArgumentException("All votes must come from "
+						+ id + " but found " + vote);
+			}
+		}
+		if (votes.stream().map(v -> v.getValue()).reduce(0,
+				Integer::sum) != 100)
+			throw new IllegalArgumentException(
+					"Sum of the placed votes must be 100");
+		// check for duplicate Vote's, possibly with different powers
+		Map<Bid, Long> counts = votes.stream().map(vote -> vote.getBid())
+				.collect(Collectors.groupingBy(bid -> bid,
+						Collectors.counting()));
+		Optional<Entry<Bid, Long>> nonunique = counts.entrySet().stream()
+				.filter(entry -> entry.getValue() > 1).findAny();
+		if (nonunique.isPresent())
+			throw new IllegalArgumentException(
+					"Votes contains multiple Vote's for "
+							+ nonunique.get().getKey());
+	}
+
+	/**
+	 * Test if Votes extends other votes. Extending means that for each vote on
+	 * bid B with power P in othervotes, this contains also a vote for bid B
+	 * with power at most P.
+	 * 
+	 * @param otherVotes the {@link VotesWithValue}, usually from a previous
+	 *                   round, that this should extend.
+	 * @return true iff this extends the otherVotes.
+	 */
+	public boolean isExtending(VotesWithValue otherVotes) {
+		if (!otherVotes.getActor().equals(getActor()))
+			return false;
+		for (VoteWithValue vote : otherVotes.getVotes()) {
+			VoteWithValue myvote = getVote(vote.getBid());
+			if (myvote == null || myvote.getMinPower() > vote.getMinPower()
+					|| myvote.getMaxPower() < vote.getMaxPower())
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * 
+	 * @param bid the bid that we may have a vote for
+	 * @return myvote for bid, or null if no vote for that bid;
+	 */
+	public VoteWithValue getVote(Bid bid) {
+		for (VoteWithValue vote : votes) {
+			if (vote.getBid().equals(bid))
+				return vote;
+		}
+		return null;
+	}
+
+	public Set<VoteWithValue> getVotes() {
+		return Collections.unmodifiableSet(votes);
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = super.hashCode();
+		result = prime * result + ((votes == null) ? 0 : votes.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (!super.equals(obj))
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		VotesWithValue other = (VotesWithValue) obj;
+		if (votes == null) {
+			if (other.votes != null)
+				return false;
+		} else if (!votes.equals(other.votes))
+			return false;
+		return true;
+	}
+
+	@Override
+	public String toString() {
+		return "VotesWithValue[" + getActor() + "," + votes + "]";
+	}
+}
Index: events/src/main/java/geniusweb/inform/Agreements.java
===================================================================
--- events/src/main/java/geniusweb/inform/Agreements.java	(revision 29)
+++ events/src/main/java/geniusweb/inform/Agreements.java	(revision 30)
@@ -30,5 +30,5 @@
 
 	@JsonCreator
-	protected Agreements(Map<PartyId, Bid> agrees) {
+	public Agreements(Map<PartyId, Bid> agrees) {
 		this.agreements = agrees;
 	}
Index: events/src/main/java/geniusweb/inform/Inform.java
===================================================================
--- events/src/main/java/geniusweb/inform/Inform.java	(revision 29)
+++ events/src/main/java/geniusweb/inform/Inform.java	(revision 30)
@@ -16,5 +16,6 @@
 		@JsonSubTypes.Type(value = YourTurn.class),
 		@JsonSubTypes.Type(value = Voting.class),
-		@JsonSubTypes.Type(value = OptIn.class) })
+		@JsonSubTypes.Type(value = OptIn.class),
+		@JsonSubTypes.Type(value = OptInWithValue.class) })
 @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
 public interface Inform {
Index: events/src/main/java/geniusweb/inform/OptInWithValue.java
===================================================================
--- events/src/main/java/geniusweb/inform/OptInWithValue.java	(revision 30)
+++ events/src/main/java/geniusweb/inform/OptInWithValue.java	(revision 30)
@@ -0,0 +1,79 @@
+package geniusweb.inform;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import geniusweb.actions.PartyId;
+import geniusweb.actions.VotesWithValue;
+
+/**
+ * Informs party that it's time to Opt-in.
+ */
+public class OptInWithValue implements Inform {
+
+	private final List<VotesWithValue> votes;
+
+	/**
+	 * @param votes a list of votes. There may be only one votes per party.
+	 */
+	@JsonCreator
+	public OptInWithValue(@JsonProperty("votes") List<VotesWithValue> votes) {
+		this.votes = votes;
+
+		Map<PartyId, Long> counts = votes.stream().map(vote -> vote.getActor())
+				.collect(Collectors.groupingBy(actor -> actor,
+						Collectors.counting()));
+		Optional<Entry<PartyId, Long>> nonunique = counts.entrySet().stream()
+				.filter(entry -> entry.getValue() > 1).findAny();
+		if (nonunique.isPresent())
+			throw new IllegalArgumentException(
+					"OptIn contains multiple Votes for party "
+							+ nonunique.get().getKey());
+
+	}
+
+	/**
+	 * @return list of votes that can be opted in to
+	 */
+	public List<VotesWithValue> getVotes() {
+		return Collections.unmodifiableList(votes);
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((votes == null) ? 0 : votes.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		OptInWithValue other = (OptInWithValue) obj;
+		if (votes == null) {
+			if (other.votes != null)
+				return false;
+		} else if (!votes.equals(other.votes))
+			return false;
+		return true;
+	}
+
+	@Override
+	public String toString() {
+		return "OptInWithValue[" + votes + "]";
+	}
+
+}
Index: events/src/test/java/geniusweb/actions/VoteWithValueTest.java
===================================================================
--- events/src/test/java/geniusweb/actions/VoteWithValueTest.java	(revision 30)
+++ events/src/test/java/geniusweb/actions/VoteWithValueTest.java	(revision 30)
@@ -0,0 +1,99 @@
+package geniusweb.actions;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.DiscreteValue;
+import geniusweb.issuevalue.NumberValue;
+import geniusweb.issuevalue.Value;
+import tudelft.utilities.junit.GeneralTests;
+
+public class VoteWithValueTest extends GeneralTests<VoteWithValue> {
+	private final ObjectMapper jackson = new ObjectMapper();
+
+	private static final PartyId id = new PartyId("party1");
+	private static final PartyId id2 = new PartyId("party2");
+	private final static Map<String, Value> issuevalues = new HashMap<String, Value>();
+	private final static Map<String, Value> issuevaluesb = new HashMap<String, Value>();
+	private static Bid bid;
+	private static Bid bidb;
+	private final static String ISSUE1 = "issue1";
+	private final static Value VALUE1 = new DiscreteValue("value1");
+	private final static String ISSUE2 = "issue2";
+	private final static Value VALUE2 = new NumberValue("10");
+	// issue 2 is NUMBER and thus serializes with leading '='
+	private final String votestring = "{\"votewithvalue\":{\"actor\":\"party1\",\"bid\":{\"issuevalues\":{\"issue2\":10,\"issue1\":\"value1\"}},\"minPower\":1,\"maxPower\":2,\"value\":10}}";
+
+	private static VoteWithValue vote1, vote1a, vote2, vote3, vote4, vote5,
+			vote6;
+
+	static {
+		issuevalues.put(ISSUE1, VALUE1);
+		issuevalues.put(ISSUE2, VALUE2);
+		bid = new Bid(issuevalues);
+		vote1 = new VoteWithValue(id, bid, 1, 2, 10);
+		vote1a = new VoteWithValue(id, bid, 1, 2, 10);
+
+		vote2 = new VoteWithValue(id2, bid, 1, 2, 10);
+
+		// values swapped, so different issuevalues.
+		issuevaluesb.put(ISSUE1, VALUE2);
+		issuevaluesb.put(ISSUE2, VALUE2);
+		bidb = new Bid(issuevaluesb);
+		vote3 = new VoteWithValue(id, bidb, 1, 2, 10);
+
+		vote4 = new VoteWithValue(id, bid, 2, 2, 10);
+		vote5 = new VoteWithValue(id, bid, 1, 3, 10);
+
+		vote6 = new VoteWithValue(id, bid, 1, 2, 20);
+
+	}
+
+	@Override
+	public List<List<VoteWithValue>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(vote1, vote1a), Arrays.asList(vote2),
+				Arrays.asList(vote3), Arrays.asList(vote4),
+				Arrays.asList(vote5), Arrays.asList(vote6));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"VoteWithValue.*party1.*issue2=10.*issue1=.value1.*1.*2.*10.*",
+				"VoteWithValue.*party2.*issue2=10.*issue1=.value1.*1.*2.*10.*",
+				"VoteWithValue.*party1.*issue2=10.*issue1=10.*1.*2.*10.*",
+				"VoteWithValue.*party1.*issue2=10.*issue1=.value1.*2.*2.*10.*",
+				"VoteWithValue.*party1.*issue2=10.*issue1=.value1.*1.*3.*10.*",
+				"VoteWithValue.*party1.*issue2=10.*issue1=.value1.*1.*2.*20.*");
+	}
+
+	@Before
+	public void before() {
+
+	}
+
+	@Test
+	public void serializeTest() throws JsonProcessingException {
+		System.out.println(jackson.writeValueAsString(vote1));
+		assertEquals(votestring, jackson.writeValueAsString(vote1));
+	}
+
+	@Test
+	public void deserializeAcceptTest() throws IOException {
+		Action act = jackson.readValue(votestring, Action.class);
+		assertEquals(vote1, act);
+	}
+
+}
Index: events/src/test/java/geniusweb/actions/VotesWithValueTest.java
===================================================================
--- events/src/test/java/geniusweb/actions/VotesWithValueTest.java	(revision 30)
+++ events/src/test/java/geniusweb/actions/VotesWithValueTest.java	(revision 30)
@@ -0,0 +1,149 @@
+package geniusweb.actions;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.DiscreteValue;
+import tudelft.utilities.junit.GeneralTests;
+
+public class VotesWithValueTest extends GeneralTests<VotesWithValue> {
+	private final ObjectMapper jackson = new ObjectMapper();
+	private final String votestring = "{\"VotesWithValue\":{\"actor\":\"partyA\",\"votes\":[{\"votewithvalue\":{\"actor\":\"partyA\",\"bid\":{\"issuevalues\":{\"is1\":\"val1\"}},\"minPower\":2,\"maxPower\":9,\"value\":30}},{\"votewithvalue\":{\"actor\":\"partyA\",\"bid\":{\"issuevalues\":{\"is1\":\"val2\"}},\"minPower\":2,\"maxPower\":9,\"value\":70}}]}}";
+
+	private PartyId partyA = new PartyId("partyA");
+	private PartyId partyB = new PartyId("partyB");
+	private Bid bid1 = new Bid("is1", new DiscreteValue("val1")),
+			bid2 = new Bid("is1", new DiscreteValue("val2"));
+	private VoteWithValue voteA1 = new VoteWithValue(partyA, bid1, 2, 9, 30);
+	private VoteWithValue voteA2 = new VoteWithValue(partyA, bid2, 2, 9, 70);
+	private VoteWithValue voteA1_100 = new VoteWithValue(partyA, bid1, 2, 9,
+			100);
+	private VoteWithValue voteA2_100 = new VoteWithValue(partyA, bid2, 2, 9,
+			100);
+	private VoteWithValue voteB1 = new VoteWithValue(partyB, bid1, 2, 9, 40);
+	private VoteWithValue voteB2 = new VoteWithValue(partyB, bid2, 2, 9, 60);
+
+	private VotesWithValue votes1 = new VotesWithValue(partyA,
+			new HashSet<>(Arrays.asList(voteA1, voteA2)));
+	private VotesWithValue votes1a = new VotesWithValue(partyA,
+			new HashSet<>(Arrays.asList(voteA1, voteA2)));
+	private VotesWithValue votes2 = new VotesWithValue(partyB,
+			new HashSet<>(Arrays.asList(voteB1, voteB2)));
+
+	@Override
+	public List<List<VotesWithValue>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(votes1, votes1a),
+				Arrays.asList(votes2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"Votes.*Vote.*partyA,Bid.*is1.*val1.*2.*Vote.*partyA,Bid.*is1.*val2.*2.*",
+				"Votes.*Vote.*partyB,Bid.*is1.*val2.*2.*Vote.*partyB,Bid.*is1.*val1.*2.*");
+	}
+
+	@SuppressWarnings("unused")
+	@Test(expected = IllegalArgumentException.class)
+	public void testRejectVoteWithIncorrectParty() {
+		new VotesWithValue(partyA, Collections.singleton(voteB1));
+	}
+
+	@Test
+	public void serializeTest() throws JsonProcessingException {
+		System.out.println(jackson.writeValueAsString(votes1));
+		assertEquals(votestring, jackson.writeValueAsString(votes1));
+	}
+
+	@Test
+	public void deserializeTest() throws IOException {
+		Action act = jackson.readValue(votestring, Action.class);
+		assertEquals(votes1, act);
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void testWrongPartyName() {
+		new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(voteB1, voteB2)));
+	}
+
+	@Test
+	public void isExtendingTestExtraVote() {
+		VotesWithValue otherVotes = new VotesWithValue(partyA,
+				Collections.singleton(voteA1_100));
+		assertTrue(votes1.isExtending(otherVotes));
+	}
+
+	@Test
+	public void isExtendingTestMissing() {
+		VotesWithValue otherVotes = new VotesWithValue(partyA,
+				Collections.singleton(voteA1_100));
+		assertFalse(otherVotes.isExtending(votes1));
+	}
+
+	@Test
+	public void isExtendingIdenticalVotes() {
+		assertTrue(votes1.isExtending(votes1));
+	}
+
+	@Test
+	public void isReallyExtendingVotesMin() {
+		VoteWithValue powervoteA1 = new VoteWithValue(partyA, bid1, 1, 9, 30);
+		VotesWithValue powerVotes = new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(powervoteA1, voteA2)));
+		assertTrue(powerVotes.isExtending(votes1));
+	}
+
+	@Test
+	public void isReallyExtendingVotesMax() {
+		VoteWithValue powervoteA1 = new VoteWithValue(partyA, bid1, 2, 10, 30);
+		VotesWithValue powerVotes = new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(powervoteA1, voteA2)));
+		assertTrue(powerVotes.isExtending(votes1));
+	}
+
+	@Test
+	public void IsNarrowingOneVoteRemoved() {
+		VotesWithValue narrowVotes = new VotesWithValue(partyA,
+				Collections.singleton(voteA2_100));
+		assertFalse(narrowVotes.isExtending(votes1));
+	}
+
+	@Test
+	public void isNarrowingTestMoreMinPower() {
+		VoteWithValue narrowVoteA1 = new VoteWithValue(partyA, bid1, 3, 9, 30);
+		VotesWithValue narrowVotes = new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(narrowVoteA1, voteA2)));
+		assertFalse(narrowVotes.isExtending(votes1));
+		assertTrue(votes1.isExtending(narrowVotes));
+	}
+
+	@Test
+	public void isNarrowingLessMaxPower() {
+		VoteWithValue powervoteA1 = new VoteWithValue(partyA, bid1, 2, 8, 30);
+		VotesWithValue narrowVotes = new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(powervoteA1, voteA2)));
+		assertFalse(narrowVotes.isExtending(votes1));
+		assertTrue(votes1.isExtending(narrowVotes));
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void testDuplicateBidsNotAllowed() {
+		VoteWithValue voteA1similar = new VoteWithValue(partyA, bid1, 3, 9, 30);
+		VotesWithValue votes = new VotesWithValue(partyA,
+				new HashSet<>(Arrays.asList(voteA1, voteA1similar)));
+	}
+}
Index: events/src/test/java/geniusweb/inform/OptInWithValueTest.java
===================================================================
--- events/src/test/java/geniusweb/inform/OptInWithValueTest.java	(revision 30)
+++ events/src/test/java/geniusweb/inform/OptInWithValueTest.java	(revision 30)
@@ -0,0 +1,84 @@
+package geniusweb.inform;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.actions.PartyId;
+import geniusweb.actions.VoteWithValue;
+import geniusweb.actions.VotesWithValue;
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.DiscreteValue;
+import tudelft.utilities.junit.GeneralTests;
+
+public class OptInWithValueTest extends GeneralTests<OptInWithValue> {
+
+	private Bid bid1 = new Bid("iss", new DiscreteValue("val1"));
+	private Bid bid2 = new Bid("iss", new DiscreteValue("val2"));
+	private PartyId partyA = new PartyId("partyA");
+	private PartyId partyB = new PartyId("partyB");
+
+	private final VoteWithValue voteA1 = new VoteWithValue(partyA, bid1, 2, 9,
+			100);
+	private final VoteWithValue voteB1 = new VoteWithValue(partyB, bid1, 2, 9,
+			60);
+	private final VoteWithValue voteB2 = new VoteWithValue(partyB, bid2, 2, 9,
+			40);
+
+	private VotesWithValue votesA = new VotesWithValue(partyA,
+			Collections.singleton(voteA1));
+	private VotesWithValue votesB = new VotesWithValue(partyB,
+			new HashSet<>(Arrays.asList(voteB1, voteB2)));
+
+	private final OptInWithValue optIn1 = new OptInWithValue(
+			Arrays.asList(votesA, votesB));
+	private final OptInWithValue optIn1a = new OptInWithValue(
+			Arrays.asList(votesA, votesB));
+	private final OptInWithValue optIn2 = new OptInWithValue(
+			Arrays.asList(votesA));
+
+	private String asJson = "{\"OptInWithValue\":{\"votes\":[{\"VotesWithValue\":{\"actor\":\"partyA\",\"votes\":[{\"votewithvalue\":{\"actor\":\"partyA\",\"bid\":{\"issuevalues\":{\"iss\":\"val1\"}},\"minPower\":2,\"maxPower\":9,\"value\":100}}]}},{\"VotesWithValue\":{\"actor\":\"partyB\",\"votes\":[{\"votewithvalue\":{\"actor\":\"partyB\",\"bid\":{\"issuevalues\":{\"iss\":\"val1\"}},\"minPower\":2,\"maxPower\":9,\"value\":60}},{\"votewithvalue\":{\"actor\":\"partyB\",\"bid\":{\"issuevalues\":{\"iss\":\"val2\"}},\"minPower\":2,\"maxPower\":9,\"value\":40}}]}}]}}";
+
+	@Override
+	public List<List<OptInWithValue>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(optIn1, optIn1a),
+				Arrays.asList(optIn2));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"OptInWithValue.*VotesWithValue.*partyA.*VoteWithValue.*partyA.*iss.*val1.*2.*VotesWithValue.*partyB.*VoteWithValue.*partyB.*iss.*val1.*.*2.*VoteWithValue.*partyB.*iss.*val2.*2.*",
+				"OptIn.*Votes.*Vote.*partyA.*iss.*val.*2.*");
+	}
+
+	@Test
+	public void testSerialize() throws JsonProcessingException {
+		ObjectMapper jackson = new ObjectMapper();
+
+		String json = jackson.writeValueAsString(optIn1);
+		System.out.println(json);
+		assertEquals(asJson, json);
+	}
+
+	@Test
+	public void testDeserialize()
+			throws JsonParseException, JsonMappingException, IOException {
+		ObjectMapper jackson = new ObjectMapper();
+		Inform p = jackson.readValue(asJson, Inform.class);
+		System.out.println(p);
+		assertEquals(optIn1, p);
+	}
+
+}
