Index: opponentmodel/src/main/java/geniusweb/opponentmodel/FrequencyOpponentModel.java
===================================================================
--- opponentmodel/src/main/java/geniusweb/opponentmodel/FrequencyOpponentModel.java	(revision 29)
+++ opponentmodel/src/main/java/geniusweb/opponentmodel/FrequencyOpponentModel.java	(revision 30)
@@ -58,5 +58,5 @@
 	 * @param resBid the reservation bid. Can be null
 	 */
-	private FrequencyOpponentModel(Domain domain,
+	protected FrequencyOpponentModel(Domain domain,
 			Map<String, Map<Value, Integer>> freqs, BigDecimal total,
 			Bid resBid) {
@@ -87,8 +87,4 @@
 			throw new IllegalStateException("domain is not initialized");
 		}
-		String err = domain.isComplete(bid);
-		if (err != null) {
-			throw new IllegalArgumentException(err);
-		}
 		if (totalBids == BigDecimal.ZERO) {
 			return BigDecimal.ONE;
@@ -97,5 +93,7 @@
 		// Assume all issues have equal weight.
 		for (String issue : domain.getIssues()) {
-			sum = sum.add(getFraction(issue, bid.getValue(issue)));
+			if (bid.getIssues().contains(issue)) {
+				sum = sum.add(getFraction(issue, bid.getValue(issue)));
+			}
 		}
 		return sum.divide(new BigDecimal(bidFrequencies.size()), DECIMALS,
Index: opponentmodel/src/test/java/geniusweb/opponentmodel/FrequencyOppModelTest.java
===================================================================
--- opponentmodel/src/test/java/geniusweb/opponentmodel/FrequencyOppModelTest.java	(revision 30)
+++ opponentmodel/src/test/java/geniusweb/opponentmodel/FrequencyOppModelTest.java	(revision 30)
@@ -0,0 +1,241 @@
+package geniusweb.opponentmodel;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+import geniusweb.actions.Offer;
+import geniusweb.actions.PartyId;
+import geniusweb.issuevalue.Bid;
+import geniusweb.issuevalue.DiscreteValue;
+import geniusweb.issuevalue.DiscreteValueSet;
+import geniusweb.issuevalue.Domain;
+import geniusweb.issuevalue.NumberValue;
+import geniusweb.issuevalue.NumberValueSet;
+import geniusweb.issuevalue.Value;
+import geniusweb.issuevalue.ValueSet;
+import geniusweb.progress.Progress;
+import tudelft.utilities.junit.GeneralTests;
+
+public class FrequencyOppModelTest
+		extends GeneralTests<FrequencyOpponentModel> {
+	private final static String ISS1 = "issue1";
+	private final static String ISS2 = "issue2";
+	private static final DiscreteValue I1V1 = new DiscreteValue("i1v1");
+	private static final DiscreteValue I1V2 = new DiscreteValue("i1v2");
+	private static final DiscreteValue I2V1 = new DiscreteValue("i2v1");
+	private static final DiscreteValue I2V2 = new DiscreteValue("i2v2");
+	private static final DiscreteValue I1V2b = new DiscreteValue("i1v2b");
+	private static final Progress progress = mock(Progress.class);
+	private static final PartyId other = new PartyId("other");
+
+	private static Domain domain, domain2, domain3;
+	private static FrequencyOpponentModel oppModel1, oppModel1b, oppModel2,
+			oppModel3, oppModel4;
+
+	private final static List<List<Bid>> list = new LinkedList<>();
+
+	private final static Bid bid1, bid2, bid3;
+	private static final BigDecimal HALF = new BigDecimal("0.5");
+
+	static {
+		Map<String, ValueSet> issues = new HashMap<>();
+		Collection<DiscreteValue> discretevalues1 = new LinkedList<>();
+		discretevalues1.add(I1V1);
+		discretevalues1.add(I1V2);
+		DiscreteValueSet values1 = new DiscreteValueSet(discretevalues1);
+		issues.put(ISS1, values1);
+		NumberValueSet values2 = new NumberValueSet(BigDecimal.ZERO,
+				BigDecimal.TEN, new BigDecimal("0.3"));
+		issues.put(ISS2, values2);
+		domain = new Domain("test", issues);
+		domain2 = new Domain("test2", issues);
+
+		// slightly different issue1
+		issues = new HashMap<>();
+		discretevalues1 = new LinkedList<>();
+		discretevalues1.add(I1V1);
+		discretevalues1.add(I1V2b);
+		values1 = new DiscreteValueSet(discretevalues1);
+		issues.put(ISS1, values1);
+		values2 = new NumberValueSet(BigDecimal.ZERO, BigDecimal.TEN,
+				new BigDecimal("0.3"));
+		issues.put(ISS2, values2);
+		domain3 = new Domain("test", issues);
+
+		// all bids are for domain
+		Map<String, Value> issuevalues = new HashMap<>();
+		issuevalues.put(ISS1, I1V1);
+		issuevalues.put(ISS2, new NumberValue(new BigDecimal("1.2")));
+		bid1 = new Bid(issuevalues);
+
+		issuevalues.put(ISS1, I1V1);
+		issuevalues.put(ISS2, new NumberValue(new BigDecimal("1.5")));
+		bid2 = new Bid(issuevalues);
+
+		issuevalues.put(ISS1, I1V2);
+		issuevalues.put(ISS2, new NumberValue(new BigDecimal("1.5")));
+		bid3 = new Bid(issuevalues);
+
+		oppModel1 = new FrequencyOpponentModel().with(domain, null);
+		oppModel1b = new FrequencyOpponentModel().with(domain, null);
+		oppModel2 = new FrequencyOpponentModel().with(domain2, null);
+		oppModel3 = new FrequencyOpponentModel().with(domain3, null);
+		oppModel4 = oppModel3.with(new Offer(other, bid1), progress);
+
+	}
+
+	@Override
+	public List<List<FrequencyOpponentModel>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(oppModel1, oppModel1b),
+				Arrays.asList(oppModel2), Arrays.asList(oppModel3),
+				Arrays.asList(oppModel4));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"FrequencyOpponentModel\\[0,\\{issue2=\\{\\}, issue1=\\{\\}\\}\\]",
+				"FrequencyOpponentModel\\[0,\\{issue2=\\{\\}, issue1=\\{\\}\\}\\]",
+				"FrequencyOpponentModel\\[0,\\{issue2=\\{\\}, issue1=\\{\\}\\}\\]",
+				"FrequencyOpponentModel\\[1,\\{issue2=\\{1.2=1\\}, issue1=\\{\"i1v1\"=1\\}\\}\\]");
+	}
+
+	@Test(expected = NullPointerException.class)
+	public void smokeTestNull() {
+		new FrequencyOpponentModel().with((Domain) null, null);
+	}
+
+	@Test
+	public void smokeTest() {
+		new FrequencyOpponentModel().with(domain, null);
+	}
+
+	@Test
+	public void testEmptyModel() {
+		FrequencyOpponentModel oppModel = new FrequencyOpponentModel()
+				.with(domain, null);
+		assertEquals(BigDecimal.ONE, oppModel.getUtility(bid1));
+		assertEquals(BigDecimal.ONE, oppModel.getUtility(bid2));
+	}
+
+	@Test
+	public void testEmptyModelPartialBid() {
+		FrequencyOpponentModel oppModel = new FrequencyOpponentModel()
+				.with(domain, null);
+		Bid bid = new Bid(Collections.emptyMap());
+		assertEquals(BigDecimal.ONE, oppModel.getUtility(bid));
+	}
+
+	@Test
+	public void testPartialUtility() {
+		Map<String, Map<Value, Integer>> freqs = new HashMap<>();
+		Map<Value, Integer> freqs1 = new HashMap<>();
+		Map<Value, Integer> freqs2 = new HashMap<>();
+
+		freqs1.put(I1V1, 2);
+		freqs1.put(I1V2, 0);
+		freqs2.put(I2V1, 1);
+		freqs2.put(I2V2, 1);
+
+		freqs.put(ISS1, freqs1);
+		freqs.put(ISS2, freqs2);
+		BigDecimal total = new BigDecimal("2");
+
+		FrequencyOpponentModel oppModel = new FrequencyOpponentModel(domain,
+				freqs, total, (Bid) null);
+
+		double E = 0.0000001;
+		assertEquals(0.5, oppModel.getUtility(new Bid(ISS1, I1V1)).floatValue(),
+				E);
+		assertEquals(0, oppModel.getUtility(new Bid(ISS1, I1V2)).floatValue(),
+				E);
+		assertEquals(0.25,
+				oppModel.getUtility(new Bid(ISS2, I2V1)).floatValue(), E);
+		assertEquals(0.25,
+				oppModel.getUtility(new Bid(ISS2, I2V2)).floatValue(), E);
+
+	}
+
+	@Test
+	public void testUpdate() {
+		FrequencyOpponentModel oppModel = oppModel1.with(new Offer(other, bid1),
+				progress);
+		assertTrue(BigDecimal.ONE.compareTo(oppModel.getUtility(bid1)) == 0);
+		assertTrue(BigDecimal.ZERO.compareTo(oppModel.getUtility(bid3)) == 0);
+		// bid2 has 1 of 2 issue values same as bid1.
+		assertTrue(HALF.compareTo(oppModel.getUtility(bid2)) == 0);
+	}
+
+	@Test
+	public void testUpdate2() {
+		// bid1 and bid2 both want I1V1. They differ on the number value.
+		// bid3 wants I1V2 but does have the number value from bid2
+		FrequencyOpponentModel oppModel = oppModel1
+				.with(new Offer(other, bid1), progress)
+				.with(new Offer(other, bid2), progress);
+		assertTrue(new BigDecimal("0.75")
+				.compareTo(oppModel.getUtility(bid1)) == 0);
+		assertTrue(new BigDecimal("0.75")
+				.compareTo(oppModel.getUtility(bid2)) == 0);
+		assertTrue(new BigDecimal("0.25")
+				.compareTo(oppModel.getUtility(bid3)) == 0);
+	}
+
+	@Test
+	public void testPartialBidUpdate() {
+		FrequencyOpponentModel oppModel = oppModel1.with(new Offer(other, bid1),
+				progress);
+		Bid partialbid = new Bid(ISS1, I1V1);
+		oppModel.with(new Offer(other, partialbid), progress);
+	}
+
+	@Test
+	public void testGetCounts() {
+		assertEquals(Collections.emptyMap(), oppModel1.getCounts(ISS1));
+		assertEquals(Collections.emptyMap(), oppModel1.getCounts(ISS2));
+
+		Map<String, Value> values1 = new HashMap<>();
+		values1.put(ISS1, I1V1);
+		values1.put(ISS2, I2V1);
+		Offer offer1 = new Offer(other, new Bid(values1));
+
+		FrequencyOpponentModel oppmod = oppModel1.with(offer1, progress);
+
+		assertEquals(1, oppmod.getCounts(ISS1).get(I1V1).intValue());
+		assertEquals(null, oppmod.getCounts(ISS1).get(I1V2));
+		assertEquals(1, oppmod.getCounts(ISS2).get(I2V1).intValue());
+		assertEquals(null, oppmod.getCounts(ISS2).get(I2V2));
+
+		// same identical bid. Counts should go to 2
+		oppmod = oppmod.with(offer1, progress);
+
+		assertEquals(2, oppmod.getCounts(ISS1).get(I1V1).intValue());
+		assertEquals(2, oppmod.getCounts(ISS2).get(I2V1).intValue());
+
+		Map<String, Value> values2 = new HashMap<>();
+		values2.put(ISS1, I1V2);
+		values2.put(ISS2, I2V2);
+		Offer offer2 = new Offer(other, new Bid(values2));
+
+		// Other bid. with value2 for both issues
+		oppmod = oppmod.with(offer2, progress);
+
+		assertEquals(2, oppmod.getCounts(ISS1).get(I1V1).intValue());
+		assertEquals(2, oppmod.getCounts(ISS2).get(I2V1).intValue());
+		assertEquals(1, oppmod.getCounts(ISS1).get(I1V2).intValue());
+		assertEquals(1, oppmod.getCounts(ISS2).get(I2V2).intValue());
+
+	}
+}
