Index: profile/src/test/java/geniusweb/profile/DefaultPartialOrderingTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/DefaultPartialOrderingTest.java	(revision 52)
+++ profile/src/test/java/geniusweb/profile/DefaultPartialOrderingTest.java	(revision 53)
@@ -27,15 +27,17 @@
 import tudelft.utilities.junit.GeneralTests;
 
-public class DefaultPartialOrderingTest extends GeneralTests<DefaultPartialOrdering> {
+public class DefaultPartialOrderingTest
+		extends GeneralTests<DefaultPartialOrdering> {
 
-	private final String serialized = "{\"DefaultPartialOrdering\":{" + "\"name\":\"ordering1\","
+	private final String serialized = "{\"DefaultPartialOrdering\":{"
+			+ "\"name\":\"ordering1\","
 			+ "\"domain\":{\"name\":\"dom1\",\"issuesValues\":{\"iss1\":{\"values\":[\"1\",\"2\",\"3\"]}}},"
-			+ "\"reservationBid\":{\"issuevalues\":{\"iss1\":\"1\"}},"
-			+ "\"bids\":[{\"issuevalues\":{\"iss1\":\"1\"}},{\"issuevalues\":{\"iss1\":\"3\"}},{\"issuevalues\":{\"iss1\":\"2\"}}],"
-			+ "\"better\":[[0,2],[1,2]]}}";
+			+ "\"better\":{\"{\\\"issuevalues\\\":{\\\"iss1\\\":\\\"1\\\"}}\":[{\"issuevalues\":{\"iss1\":\"2\"}}],\"{\\\"issuevalues\\\":{\\\"iss1\\\":\\\"3\\\"}}\":[{\"issuevalues\":{\"iss1\":\"2\"}}]},"
+			+ "\"reservationbid\":{\"issuevalues\":{\"iss1\":\"1\"}}}}";
 
 	// we need real (not mock) values otherwise serializer crashes..
 	private String issue1 = "iss1";
-	private DefaultPartialOrdering ordering1, ordering1b, ordering2, ordering3, ordering4, ordering5;
+	private DefaultPartialOrdering ordering1, ordering1b, ordering2, ordering3,
+			ordering4, ordering5;
 
 	private Bid bid1, bid2, bid3;
@@ -47,5 +49,6 @@
 		DiscreteValue val2 = new DiscreteValue("2");
 		DiscreteValue val3 = new DiscreteValue("3");
-		issues.put(issue1, new DiscreteValueSet(new HashSet<>(Arrays.asList(val1, val2, val3))));
+		issues.put(issue1, new DiscreteValueSet(
+				new HashSet<>(Arrays.asList(val1, val2, val3))));
 		Domain domain1 = new Domain("dom1", issues);
 		Domain domain2 = new Domain("dom2", issues);
@@ -62,10 +65,16 @@
 		map2.put(bid3, new HashSet<Bid>(Arrays.asList(bid1)));
 
-		ordering1 = new DefaultPartialOrdering("ordering1", domain1, bid1, map1);
-		ordering1b = new DefaultPartialOrdering("ordering1", domain1, bid1, map1);
-		ordering2 = new DefaultPartialOrdering("ordering2", domain1, bid1, map1);
-		ordering3 = new DefaultPartialOrdering("ordering1", domain2, bid1, map1);
-		ordering4 = new DefaultPartialOrdering("ordering1", domain1, bid2, map1);
-		ordering5 = new DefaultPartialOrdering("ordering1", domain1, bid1, map2);
+		ordering1 = new DefaultPartialOrdering("ordering1", domain1, bid1,
+				map1);
+		ordering1b = new DefaultPartialOrdering("ordering1", domain1, bid1,
+				map1);
+		ordering2 = new DefaultPartialOrdering("ordering2", domain1, bid1,
+				map1);
+		ordering3 = new DefaultPartialOrdering("ordering1", domain2, bid1,
+				map1);
+		ordering4 = new DefaultPartialOrdering("ordering1", domain1, bid2,
+				map1);
+		ordering5 = new DefaultPartialOrdering("ordering1", domain1, bid1,
+				map2);
 
 	}
@@ -73,5 +82,6 @@
 	@Override
 	public List<List<DefaultPartialOrdering>> getGeneralTestData() {
-		return Arrays.asList(Arrays.asList(ordering1, ordering1b), Arrays.asList(ordering2), Arrays.asList(ordering3),
+		return Arrays.asList(Arrays.asList(ordering1, ordering1b),
+				Arrays.asList(ordering2), Arrays.asList(ordering3),
 				Arrays.asList(ordering4), Arrays.asList(ordering5));
 	}
@@ -79,5 +89,6 @@
 	@Override
 	public List<String> getGeneralTestStrings() {
-		return Arrays.asList("DefaultPartialOrdering.*", "DefaultPartialOrdering.*", "DefaultPartialOrdering.*",
+		return Arrays.asList("DefaultPartialOrdering.*",
+				"DefaultPartialOrdering.*", "DefaultPartialOrdering.*",
 				"DefaultPartialOrdering.*", "DefaultPartialOrdering.*");
 	}
Index: profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java	(revision 52)
+++ profile/src/test/java/geniusweb/profile/utilityspace/LinearAdditiveTest.java	(revision 53)
@@ -22,4 +22,5 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.exc.ValueInstantiationException;
 
 import geniusweb.issuevalue.Bid;
@@ -309,3 +310,18 @@
 	}
 
+	/**
+	 * This should throw because computersell-domainmismatch has a mismatch: it
+	 * has "high 32G" as graphics option, but the utilities have no value for
+	 * that. Instead it talks about "high 24G"
+	 */
+	@Test(expected = ValueInstantiationException.class)
+	public void testIsFitting() throws IOException {
+		String profile = new String(
+				Files.readAllBytes(Paths.get(
+						"src/test/resources/computersell-domainmismatch.json")),
+				StandardCharsets.UTF_8);
+		UtilitySpace space = jackson.readValue(profile, UtilitySpace.class);
+
+	}
+
 }
Index: profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java
===================================================================
--- profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java	(revision 52)
+++ profile/src/test/java/geniusweb/profile/utilityspace/SumOfGroupsUtilitySpaceTest.java	(revision 53)
@@ -21,6 +21,9 @@
 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 com.fasterxml.jackson.databind.exc.ValueInstantiationException;
 
 import geniusweb.issuevalue.Bid;
@@ -34,6 +37,8 @@
 import tudelft.utilities.immutablelist.ImmutableList;
 import tudelft.utilities.immutablelist.Outer;
-
-public class SumOfGroupsUtilitySpaceTest {
+import tudelft.utilities.junit.GeneralTests;
+
+public class SumOfGroupsUtilitySpaceTest
+		extends GeneralTests<SumOfGroupsUtilitySpace> {
 	private final ObjectMapper jackson = new ObjectMapper();
 	private SumOfGroupsUtilitySpace pa1;
@@ -49,6 +54,7 @@
 
 	private Domain domain;
-	private PartsUtilities putils12, putils3;
+	private PartsUtilities putils12, putils3, putils3b;
 	private String serialized = "{\"SumOfGroupsUtilitySpace\":{\"domain\":{\"name\":\"domain\",\"issuesValues\":{\"issue3\":{\"values\":[\"low\",\"high\"]},\"issue2\":{\"values\":[\"low\",\"high\"]},\"issue1\":{\"values\":[\"low\",\"high\"]}}},\"name\":\"testspace\",\"partUtilities\":{\"1and2\":{\"PartsUtilities\":{\"issues\":[\"issue1\",\"issue2\"],\"utilslist\":[{\"values\":[\"low\",\"low\"],\"util\":0.16},{\"values\":[\"high\",\"high\"],\"util\":0.72},{\"values\":[\"low\",\"high\"],\"util\":0.16},{\"values\":[\"high\",\"low\"],\"util\":0.16}]}},\"3\":{\"PartsUtilities\":{\"issues\":[\"issue3\"],\"utilslist\":[{\"values\":[\"low\"],\"util\":0.16},{\"values\":[\"high\"],\"util\":0.14}]}}},\"reservationbid\":{\"issuevalues\":{\"issue1\":\"high\"}}}}";
+	private SumOfGroupsUtilitySpace sog1, sog1a, sog2, sog3;
 
 	@Before
@@ -78,4 +84,41 @@
 		putils3 = new PartsUtilities(Arrays.asList(iss3), utils3);
 
+		Map<ProductOfValue, BigDecimal> utils3b = new HashMap<>();
+		utils3b.put(new ProductOfValue(Arrays.asList(lo)), N07.multiply(N02));
+		utils3b.put(new ProductOfValue(Arrays.asList(hi)), N08.multiply(N02));
+		putils3b = new PartsUtilities(Arrays.asList(iss3), utils3b);
+
+		HashMap<String, PartsUtilities> partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		partutils.put("3", putils3);
+
+		sog1 = new SumOfGroupsUtilitySpace(domain, "testspace", partutils,
+				resBid);
+		sog1a = new SumOfGroupsUtilitySpace(domain, "testspace", partutils,
+				resBid);
+		sog2 = new SumOfGroupsUtilitySpace(domain, "testspace2", partutils,
+				resBid);
+
+		// reuse partutils. Also checks that the values have been copied
+		partutils = new HashMap<>();
+		partutils.put("1and2", putils12);
+		partutils.put("3", putils3b);
+		sog3 = new SumOfGroupsUtilitySpace(domain, "testspace", partutils,
+				resBid);
+
+	}
+
+	@Override
+	public List<List<SumOfGroupsUtilitySpace>> getGeneralTestData() {
+		return Arrays.asList(Arrays.asList(sog1, sog1a), Arrays.asList(sog2),
+				Arrays.asList(sog3));
+	}
+
+	@Override
+	public List<String> getGeneralTestStrings() {
+		return Arrays.asList(
+				"SumOfGroupsUtilitySpace.*testspace.*1and2.*PartsUtilities.*issue1.*issue2.*3.*PartsUtilities.*Bid.*issue1.*high.*",
+				"SumOfGroupsUtilitySpace.*testspace2.*1and2.*PartsUtilities.*issue1.*issue2.*3.*PartsUtilities.*Bid.*issue1.*high.*",
+				"SumOfGroupsUtilitySpace.*testspace.*1and2.*PartsUtilities.*issue1.*issue2.*3.*PartsUtilities.*Bid.*issue1.*high.*");
 	}
 
@@ -161,5 +204,5 @@
 		LinearAdditiveUtilitySpace las = jackson.readValue(profile,
 				LinearAdditiveUtilitySpace.class);
-		SumOfGroupsUtilitySpace pas = new SumOfGroupsUtilitySpace(las);
+		SumOfGroupsUtilitySpace pas = SumOfGroupsUtilitySpace.create(las);
 		checkUtilitiesAllEqual(las, pas);
 		System.out.println("Generated partial profile:\n" + pas);
@@ -178,5 +221,5 @@
 		LinearAdditiveUtilitySpace las = jackson.readValue(profile,
 				LinearAdditiveUtilitySpace.class);
-		SumOfGroupsUtilitySpace pas = new SumOfGroupsUtilitySpace(las);
+		SumOfGroupsUtilitySpace pas = SumOfGroupsUtilitySpace.create(las);
 		pas = pas.group(Arrays.asList("Food", "Drinks"), "food&drinks");
 		checkUtilitiesAllEqual(las, pas);
@@ -235,4 +278,50 @@
 	}
 
+	@Test
+	public void loadComputerBuy() throws IOException {
+		UtilitySpace space = jackson.readValue(
+				getClass().getResourceAsStream("/computerbuy.json"),
+				UtilitySpace.class);
+		assertTrue(space instanceof SumOfGroupsUtilitySpace);
+
+	}
+
+	@Test
+	public void loadComputerSell() throws IOException {
+		UtilitySpace space = jackson.readValue(
+				getClass().getResourceAsStream("/computersell.json"),
+				UtilitySpace.class);
+		assertTrue(space instanceof LinearAdditiveUtilitySpace);
+
+	}
+
+	@Test(expected = ValueInstantiationException.class)
+	public void loadComputerBuyIncomplete() throws IOException {
+		UtilitySpace space = jackson.readValue(
+				getClass().getResourceAsStream("/computerbuyincomplete.json"),
+				UtilitySpace.class);
+		assertTrue(space instanceof LinearAdditiveUtilitySpace);
+
+	}
+
+	@Test
+	public void loadComputerBuyNumbers() throws IOException {
+		UtilitySpace space = jackson.readValue(
+				getClass().getResourceAsStream("/computerbuynumbers.json"),
+				UtilitySpace.class);
+		assertTrue(space instanceof SumOfGroupsUtilitySpace);
+
+	}
+
+	@Test
+	public void testComputerBuyUtility()
+			throws JsonParseException, JsonMappingException, IOException {
+		SumOfGroupsUtilitySpace space = jackson.readValue(
+				getClass().getResourceAsStream("/computerbuy.json"),
+				SumOfGroupsUtilitySpace.class);
+		Bid bid = space.getReservationBid();
+		assertEquals(new BigDecimal("0.625"), space.getUtility(bid));
+	}
+
 	/************************ PRIVATE FUNCTIONS *******************/
 
