Index: bidspace/src/test/java/geniusweb/bidspace/pareto/GenericParetoTest.java
===================================================================
--- bidspace/src/test/java/geniusweb/bidspace/pareto/GenericParetoTest.java	(revision 43)
+++ bidspace/src/test/java/geniusweb/bidspace/pareto/GenericParetoTest.java	(revision 44)
@@ -2,10 +2,11 @@
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -14,8 +15,9 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
+import org.junit.Before;
 import org.junit.Test;
 
-import geniusweb.bidspace.pareto.GenericPareto;
 import geniusweb.issuevalue.Bid;
 import geniusweb.issuevalue.DiscreteValue;
@@ -27,4 +29,5 @@
 import geniusweb.issuevalue.ValueSet;
 import geniusweb.profile.PartialOrdering;
+import geniusweb.profile.Profile;
 
 public class GenericParetoTest {
@@ -39,13 +42,17 @@
 	private static final Map<String, ValueSet> issues = new HashMap<>();
 
-	private static final ValueSet values1;
-	private static final ValueSet values2;
+	private static ValueSet values1;
+	private static ValueSet values2;
 	private static final BigDecimal TWO = new BigDecimal("2");
 	private static final BigDecimal THREE = new BigDecimal("3");
 
-	private static final Domain domain;
+	private static Domain domain;
 	private static Bid bid1, bid2, bid3;
 
-	static {
+	private PartialOrdering profile1, profile2, profile3;
+	private GenericPareto pareto;
+
+	@Before
+	public void before() {
 		Collection<DiscreteValue> discretevalues1 = new LinkedList<>();
 		discretevalues1.add(I1V1);
@@ -70,13 +77,17 @@
 		bid3 = new Bid(issuevalues);
 
+		profile1 = mock(PartialOrdering.class);
+		profile2 = mock(PartialOrdering.class);
+		profile3 = mock(PartialOrdering.class);
+		when(profile1.getDomain()).thenReturn(domain);
+		when(profile2.getDomain()).thenReturn(domain);
+		when(profile3.getDomain()).thenReturn(domain);
+
+		pareto = new GenericPareto(Arrays.asList(profile1, profile2));
+
 	}
 
 	@Test
 	public void genericParetoTest() {
-		PartialOrdering profile1 = mock(PartialOrdering.class);
-		PartialOrdering profile2 = mock(PartialOrdering.class);
-
-		when(profile1.getDomain()).thenReturn(domain);
-		when(profile2.getDomain()).thenReturn(domain);
 
 		// fefault: there is no preference at all, all isPreferredOrEqual
@@ -92,9 +103,4 @@
 	@Test
 	public void genericParetoTest1() {
-		PartialOrdering profile1 = mock(PartialOrdering.class);
-		PartialOrdering profile2 = mock(PartialOrdering.class);
-
-		when(profile1.getDomain()).thenReturn(domain);
-		when(profile2.getDomain()).thenReturn(domain);
 
 		// both prefer bid1 over any other bid.
@@ -103,7 +109,4 @@
 		when(profile2.isPreferredOrEqual(eq(bid1), any(Bid.class)))
 				.thenReturn(true);
-
-		List<PartialOrdering> profiles = Arrays.asList(profile1, profile2);
-		GenericPareto pareto = new GenericPareto(profiles);
 
 		Collection<Bid> points = pareto.getPoints();
@@ -114,9 +117,4 @@
 	@Test
 	public void genericParetoTest2() {
-		PartialOrdering profile1 = mock(PartialOrdering.class);
-		PartialOrdering profile2 = mock(PartialOrdering.class);
-
-		when(profile1.getDomain()).thenReturn(domain);
-		when(profile2.getDomain()).thenReturn(domain);
 
 		// both prefer bid2 over any other bid.
@@ -125,6 +123,4 @@
 		when(profile2.isPreferredOrEqual(eq(bid2), any(Bid.class)))
 				.thenReturn(true);
-		List<PartialOrdering> profiles = Arrays.asList(profile1, profile2);
-		GenericPareto pareto = new GenericPareto(profiles);
 
 		Collection<Bid> points = pareto.getPoints();
@@ -136,10 +132,4 @@
 	@Test
 	public void genericParetoTest3() {
-		PartialOrdering profile1 = mock(PartialOrdering.class);
-		PartialOrdering profile2 = mock(PartialOrdering.class);
-
-		when(profile1.getDomain()).thenReturn(domain);
-		when(profile2.getDomain()).thenReturn(domain);
-
 		// profile1 prefers bid1, profile2 prefers bid2.
 		// now neither bid1 nor bid2 are dominating each other
@@ -149,6 +139,4 @@
 		when(profile2.isPreferredOrEqual(eq(bid2), any(Bid.class)))
 				.thenReturn(true);
-		List<PartialOrdering> profiles = Arrays.asList(profile1, profile2);
-		GenericPareto pareto = new GenericPareto(profiles);
 
 		Collection<Bid> points = pareto.getPoints();
@@ -159,9 +147,4 @@
 	@Test
 	public void genericParetoTest4() {
-		PartialOrdering profile1 = mock(PartialOrdering.class);
-		PartialOrdering profile2 = mock(PartialOrdering.class);
-
-		when(profile1.getDomain()).thenReturn(domain);
-		when(profile2.getDomain()).thenReturn(domain);
 
 		// profile1 prefers bid1, profile2 prefers bid2.
@@ -175,6 +158,4 @@
 		when(profile2.isPreferredOrEqual(eq(bid2), any(Bid.class)))
 				.thenReturn(true);
-		List<PartialOrdering> profiles = Arrays.asList(profile1, profile2);
-		GenericPareto pareto = new GenericPareto(profiles);
 
 		Collection<Bid> points = pareto.getPoints();
@@ -183,3 +164,31 @@
 	}
 
+	@Test(expected = IllegalArgumentException.class)
+	public void testNullNotOk() {
+		new GenericPareto(Arrays.asList(profile1, null, profile1));
+	}
+
+	@Test
+	public void testImmutable() {
+		List<PartialOrdering> list = new ArrayList<>(
+				Arrays.asList(profile1, profile2));
+		GenericPareto pareto = new GenericPareto(list);
+		// if we modify the list, the pareto should not change
+		list.add(profile3);
+		assertEquals(2, pareto.getProfiles().size());
+	}
+
+	@Test(expected = UnsupportedOperationException.class)
+	public void testGetParetoAndAdd() {
+		List<Profile> list = pareto.getProfiles();
+		list.add(profile3);
+
+	}
+
+	@Test(expected = UnsupportedOperationException.class)
+	public void testGetPointsAndAdd() {
+		Set<Bid> list = pareto.getPoints();
+		list.add(bid1);
+	}
+
 }
Index: bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoE2Etest.java
===================================================================
--- bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoE2Etest.java	(revision 43)
+++ bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoE2Etest.java	(revision 44)
@@ -36,5 +36,5 @@
 						"src/test/resources/jobs/jobs2.json", 18 },
 				{ "src/test/resources/7issues/7issues1.json",
-						"src/test/resources/7issues/7issues2.json", 351 } });
+						"src/test/resources/7issues/7issues2.json", 557 } });
 	}
 
Index: bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoPointTest.java
===================================================================
--- bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoPointTest.java	(revision 43)
+++ bidspace/src/test/java/geniusweb/bidspace/pareto/ParetoPointTest.java	(revision 44)
@@ -4,5 +4,5 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -10,5 +10,6 @@
 import java.math.BigDecimal;
 import java.util.Arrays;
-import java.util.HashSet;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.junit.Before;
@@ -85,21 +86,15 @@
 	@Test
 	public void mergeTest() {
+		Value value1 = mock(Value.class), value2 = mock(Value.class),
+				value3 = mock(Value.class);
 		// partial bid 020_010 has value 0.2 for issue 2 in space1 and 0.1 for
 		// issue 2 in space2.
-		Bid partialbid020_010 = mock(Bid.class),
-				partialbid102_301 = mock(Bid.class);
+		Bid partialbid020_010 = new Bid("issue2", value2);
+		Map<String, Value> vals2 = new HashMap<>();
+		vals2.put("issue1", value1);
+		vals2.put("issue3", value3);
+		Bid partialbid102_301 = new Bid(vals2);
 		// merged this should be a bid 122_311 so it has utilities
 		// 1+2+2=0.5 in space1 and 3+1+1=0.5 in space2
-
-		when(partialbid020_010.getIssues())
-				.thenReturn(new HashSet<String>(Arrays.asList("issue2")));
-		when(partialbid102_301.getIssues()).thenReturn(
-				new HashSet<String>(Arrays.asList("issue1", "issue3")));
-
-		Value value1 = mock(Value.class), value2 = mock(Value.class),
-				value3 = mock(Value.class);
-		when(partialbid020_010.getValue(eq("issue2"))).thenReturn(value2);
-		when(partialbid102_301.getValue(eq("issue1"))).thenReturn(value1);
-		when(partialbid102_301.getValue(eq("issue3"))).thenReturn(value3);
 
 		when(space1.getUtility(eq(partialbid020_010))).thenReturn(D0_2);
@@ -115,11 +110,4 @@
 		ParetoPoint p = p1.merge(p2);
 		Bid bid = p.getBid();
-		assertEquals(
-				new HashSet<String>(
-						Arrays.asList("issue1", "issue2", "issue3")),
-				bid.getIssues());
-		assertEquals(value1, bid.getValue("issue1"));
-		assertEquals(value2, bid.getValue("issue2"));
-		assertEquals(value3, bid.getValue("issue3"));
 		assertEquals(D0_5, p.getUtilities().get(0));
 		assertEquals(D0_5, p.getUtilities().get(1));
