GuidedDecisionTableApplicationPreferencesLoader implements ApplicationPreferencesLoader { @Override public Map<String, String> load() { final Map<String, String> preferences = new HashMap<String, String>(); final String property = getProperty(); log.info( "Setting preference '" + GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED + "' to '" + property + "'." ); preferences.put( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED, property ); return preferences; }  @Override Map<String, String> load();  }
@Test public void notSet() throws Exception { assertEquals( "false", new GuidedDecisionTableApplicationPreferencesLoader().load().get( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED ) ); }
@Test public void setTrue() throws Exception { System.setProperty( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED, "true" ); assertEquals( "true", new GuidedDecisionTableApplicationPreferencesLoader().load().get( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED ) ); }
@Test public void setFalse() throws Exception { System.setProperty( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED, "false" ); assertEquals( "false", new GuidedDecisionTableApplicationPreferencesLoader().load().get( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_DISABLED ) ); }