Index: bidspace/src/test/java/geniusweb/bidspace/BidsWithUtilityTest.java
===================================================================
--- bidspace/src/test/java/geniusweb/bidspace/BidsWithUtilityTest.java	(revision 2)
+++ bidspace/src/test/java/geniusweb/bidspace/BidsWithUtilityTest.java	(revision 2)
@@ -0,0 +1,100 @@
+package geniusweb.bidspace;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+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.ValueSet;
+import geniusweb.profile.Profile;
+import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
+
+public class BidsWithUtilityTest {
+	private static final DiscreteValue I1V2 = new DiscreteValue("i1v2");
+	private static final DiscreteValue I1V1 = new DiscreteValue("i1v1");
+	private static final NumberValue I2V1 = new NumberValue("2.00");
+	private static final NumberValue I2V2 = new NumberValue("2.45");
+	private static final NumberValue I2V3 = new NumberValue("2.90");
+	private static final String DOMAINNAME = "testdomain";
+	private static final String ISSUE1 = "issue1";
+	private static final String ISSUE2 = "issue2";
+	private static final Map<String, ValueSet> issues = new HashMap<>();
+
+	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 final static BigDecimal ZERO_1 = new BigDecimal("0.1"), ZERO_2 = new BigDecimal("0.2"),
+			ZERO_3 = new BigDecimal("0.3");
+
+	private static Domain domain;
+	private final static ObjectMapper jackson = new ObjectMapper();
+
+	@Before
+	public void before() {
+		Collection<DiscreteValue> discretevalues1 = new LinkedList<>();
+		discretevalues1.add(I1V1);
+		discretevalues1.add(I1V2);
+		values1 = new DiscreteValueSet(discretevalues1);
+		issues.put(ISSUE1, values1);
+
+		values2 = new NumberValueSet(TWO, THREE, new BigDecimal("0.45"));
+		issues.put(ISSUE2, values2);
+
+		domain = new Domain(DOMAINNAME, issues);
+
+	}
+
+	@Test
+	public void smokeTest() {
+		LinearAdditiveUtilitySpace space = mock(LinearAdditiveUtilitySpace.class);
+		when(space.getDomain()).thenReturn(domain);
+		when(space.getUtility(any(Bid.class))).thenReturn(ZERO_2);
+		new BidsWithUtility(space, new BigDecimal("0.1"), new BigDecimal("0.3"));
+	}
+
+	@Test
+	public void testSelection() {
+		LinearAdditiveUtilitySpace space = mock(LinearAdditiveUtilitySpace.class);
+
+		when(space.getDomain()).thenReturn(domain);
+		when(space.getUtility(any(Bid.class))).thenReturn(ZERO_2);
+		BidsWithUtility selected = new BidsWithUtility(space, new BigDecimal("0.1"), new BigDecimal("0.3"));
+		assertEquals(new BigInteger("6"), selected.size());
+	}
+
+	@Test
+	public void testRealSpace() throws IOException {
+		String file1 = new String(Files.readAllBytes(Paths.get("src/test/resources/jobs/jobs1.json")));
+		LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) jackson.readValue(file1, Profile.class);
+		BidsWithUtility selected = new BidsWithUtility(profile, ZERO_1, ZERO_3);
+
+		assertEquals(new BigInteger("56"), selected.size());
+		for (Bid bid : selected) {
+			assertEquals(1, profile.getUtility(bid).compareTo(ZERO_1));
+			assertEquals(-1, profile.getUtility(bid).compareTo(ZERO_3));
+		}
+	}
+
+}
Index: bidspace/src/test/java/geniusweb/bidspace/PartialSpaceFromUtilityTest.java
===================================================================
--- bidspace/src/test/java/geniusweb/bidspace/PartialSpaceFromUtilityTest.java	(revision 2)
+++ bidspace/src/test/java/geniusweb/bidspace/PartialSpaceFromUtilityTest.java	(revision 2)
@@ -0,0 +1,27 @@
+package geniusweb.bidspace;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import geniusweb.profile.Profile;
+import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
+
+public class PartialSpaceFromUtilityTest {
+	private final static ObjectMapper jackson = new ObjectMapper();
+
+	@Test
+	public void createPartialSpaceJobs() throws IOException {
+		String file1 = new String(Files.readAllBytes(Paths.get("src/test/resources/jobs/jobs1.json")));
+		LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) jackson.readValue(file1, Profile.class);
+		PartialSpaceFromUtility partial = new PartialSpaceFromUtility(profile, 20);
+		System.out.println(jackson.writeValueAsString(partial));
+		assertEquals(20, partial.getBetter().size());
+	}
+}
