@Test public void getUserRoot() { Preferences pref = factory.userRoot(); assertThat(pref, notNullValue()); assertThat(pref.name(), is(MemoryPreferences.ROOT_NAME)); assertThat(pref, is(factory.userRoot())); }
public synchronized Preferences userRoot() { if (user == null) { user = new MemoryPreferences(); log.debug("Created user root: {}", user); } return user; }
MemoryPreferencesFactory implements PreferencesFactory { public synchronized Preferences userRoot() { if (user == null) { user = new MemoryPreferences(); log.debug("Created user root: {}", user); } return user; } }
MemoryPreferencesFactory implements PreferencesFactory { public synchronized Preferences userRoot() { if (user == null) { user = new MemoryPreferences(); log.debug("Created user root: {}", user); } return user; }  }
MemoryPreferencesFactory implements PreferencesFactory { public synchronized Preferences userRoot() { if (user == null) { user = new MemoryPreferences(); log.debug("Created user root: {}", user); } return user; }  synchronized Preferences systemRoot(); synchronized Preferences userRoot(); }
MemoryPreferencesFactory implements PreferencesFactory { public synchronized Preferences userRoot() { if (user == null) { user = new MemoryPreferences(); log.debug("Created user root: {}", user); } return user; }  synchronized Preferences systemRoot(); synchronized Preferences userRoot();  }