### Question:
ExamplesPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); addSystemProperty( preferences, ExamplesService.EXAMPLES_SYSTEM_PROPERTY ); return preferences; }  @Override Map<String, String> load();  }### Answer:
@Test public void testWithoutSystemProperty() { final Map<String, String> results = loader.load(); assertNotNull( results ); assertEquals( 1, results.size() ); assertTrue( Boolean.parseBoolean( results.get( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) ); }
@Test public void testWithSystemPropertyTrue() { System.setProperty( ExamplesService.EXAMPLES_SYSTEM_PROPERTY, "true" ); final Map<String, String> results = loader.load(); assertNotNull( results ); assertEquals( 1, results.size() ); assertTrue( Boolean.parseBoolean( results.get( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) ); }
@Test public void testWithSystemPropertyFalse() { System.setProperty( ExamplesService.EXAMPLES_SYSTEM_PROPERTY, "false" ); final Map<String, String> results = loader.load(); assertNotNull( results ); assertEquals( 1, results.size() ); assertFalse( Boolean.parseBoolean( results.get( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) ); }
@Test public void testWithSystemPropertyDuffValue() { System.setProperty( ExamplesService.EXAMPLES_SYSTEM_PROPERTY, "cheese" ); final Map<String, String> results = loader.load(); assertNotNull( results ); assertEquals( 1, results.size() ); assertFalse( Boolean.parseBoolean( results.get( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) ); }