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