Index: src/test/java/geniusweb/profilesserver/AutoUpdatingProfilesFactoryTest.java
===================================================================
--- src/test/java/geniusweb/profilesserver/AutoUpdatingProfilesFactoryTest.java	(revision 43)
+++ src/test/java/geniusweb/profilesserver/AutoUpdatingProfilesFactoryTest.java	(revision 1)
@@ -44,5 +44,4 @@
  */
 public class AutoUpdatingProfilesFactoryTest {
-
 	private static final String JOBS = "jobs";
 	private static final String JOB1 = "jobs/jobs1";
@@ -51,5 +50,5 @@
 	private List<String> warnings;
 	private Path copyrepodir;
-	private AutoUpdatingProfilesRepository factory;
+	private AutoUpdatingProfilesFactory factory;
 	private final long HIGHRATE = 500; // fast so that we can test quickly.
 	private final List<ChangeEvent> changes = new LinkedList<>();
@@ -80,5 +79,5 @@
 		};
 
-		factory = new AutoUpdatingProfilesRepository(logger) {
+		factory = new AutoUpdatingProfilesFactory(logger) {
 
 			@Override
@@ -120,8 +119,7 @@
 	@Test
 	public void getDomainsTest() {
-		assertTrue(factory.getDomains().size() > 2);
-		assertTrue(factory.getDomains().contains(JOBS));
-		assertTrue(factory.getDomains().contains(JOBS));
-		assertTrue(factory.getDomains().contains("7issues"));
+		assertEquals(2, factory.getDomains().size());
+		assertEquals(JOBS, factory.getDomains().get(0));
+		assertEquals("7issues", factory.getDomains().get(1));
 
 	}
@@ -146,9 +144,8 @@
 		Thread.sleep(HIGHRATE);
 
-		assertEquals(4, changes.size());
+		assertEquals(3, changes.size());
 		assertTrue(changes.get(0) instanceof ProfileChangeEvent);
 		assertTrue(changes.get(1) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(2) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(3) instanceof DomainChangeEvent);
+		assertTrue(changes.get(2) instanceof DomainChangeEvent);
 		assertEquals(1, warnings.size()); // jobs domain file missing
 		assertNull(factory.getDomain(JOBS));
@@ -164,9 +161,8 @@
 		Thread.sleep(HIGHRATE);
 
-		assertEquals(4, changes.size());
+		assertEquals(3, changes.size());
 		assertTrue(changes.get(0) instanceof ProfileChangeEvent);
 		assertTrue(changes.get(1) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(2) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(3) instanceof DomainChangeEvent);
+		assertTrue(changes.get(2) instanceof DomainChangeEvent);
 		assertEquals(1, warnings.size()); // wrong domain file, wrong profile
 		assertNull(factory.getDomain(JOBS));
@@ -222,20 +218,4 @@
 	}
 
-	@Test
-	public void saveProfileTest() throws IOException {
-		assertEquals(0, changes.size());
-		LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) factory
-				.getProfile(JOB1);
-		Profile newprofile = new LinearAdditiveUtilitySpace(profile.getDomain(),
-				"jobsA", profile.getUtilities(), profile.getWeights(),
-				profile.getReservationBid());
-		factory.putProfile(newprofile);
-		// check response immediately
-		assertEquals(1, changes.size());
-		assertTrue(changes.get(0) instanceof ProfileChangeEvent);
-		// check file was written
-		assertTrue(copyrepodir.resolve("jobs/jobsA.json").toFile().exists());
-	}
-
 	/**
 	 * We remove jobs domain.
@@ -251,19 +231,9 @@
 		assertNull(factory.getProfile(JOB1));
 
-		assertEquals(4, changes.size());
+		assertEquals(3, changes.size());
 		assertTrue(changes.get(0) instanceof ProfileChangeEvent);
 		assertTrue(changes.get(1) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(2) instanceof ProfileChangeEvent);
-		assertTrue(changes.get(3) instanceof DomainChangeEvent);
+		assertTrue(changes.get(2) instanceof DomainChangeEvent);
 		assertEquals(0, warnings.size());
-	}
-
-	@Test
-	public void testEnvVariable() throws IOException {
-		Path dir = Files.createTempDirectory("tempdir");
-		// This test does not work because we can not set the env variable.
-		// new EnvironmentVariables().set("PROFILES_ROOTDIR", "1");
-		System.setProperty("PROFILES_ROOTDIR", "1");// dir.toAbsolutePath().toString());
-		System.out.println(System.getenv("PROFILES_ROOTDIR"));
 	}
 
Index: src/test/java/geniusweb/profilesserver/DefaultProfilesFactoryTest.java
===================================================================
--- src/test/java/geniusweb/profilesserver/DefaultProfilesFactoryTest.java	(revision 43)
+++ src/test/java/geniusweb/profilesserver/DefaultProfilesFactoryTest.java	(revision 1)
@@ -27,5 +27,5 @@
 	private Domain domain1 = mock(Domain.class);
 	private List<ChangeEvent> events = new LinkedList<>();
-	private DefaultProfilesRepository factory;
+	private DefaultProfilesFactory factory;
 
 	private Profile profile1 = mock(Profile.class);
@@ -40,5 +40,5 @@
 		when(profile1a.getDomain()).thenReturn(domain1);
 		when(profile1a.getName()).thenReturn(PROFILE1);
-		factory = new DefaultProfilesRepository();
+		factory = new DefaultProfilesFactory();
 		factory.addListener(new Listener<ChangeEvent>() {
 
