JobEntryUtils { public static boolean asBoolean( String s, VariableSpace variableSpace ) { String value = variableSpace.environmentSubstitute( s ); return Boolean.parseBoolean( value ); }  static Logger findLogger( String logName ); static void attachAppenderTo( Appender appender, LogLevel logLevel, Map<String, Level> logLevelCache,
      String... logNames ); static void removeAppenderFrom( Appender appender, Map<String, Level> logLevelCache, String... logNames ); static boolean asBoolean( String s, VariableSpace variableSpace ); static Long asLong( String s, VariableSpace variableSpace );  }
@Test public void asBoolean() { VariableSpace variableSpace = new Variables(); assertFalse( JobEntryUtils.asBoolean( "not-true", variableSpace ) ); assertFalse( JobEntryUtils.asBoolean( Boolean.FALSE.toString(), variableSpace ) ); assertTrue( JobEntryUtils.asBoolean( Boolean.TRUE.toString(), variableSpace ) ); assertFalse( JobEntryUtils.asBoolean( "${booleanValue}", variableSpace ) ); variableSpace.setVariable( "booleanValue", Boolean.TRUE.toString() ); assertTrue( JobEntryUtils.asBoolean( "${booleanValue}", variableSpace ) ); variableSpace.setVariable( "booleanValue", Boolean.FALSE.toString() ); assertFalse( JobEntryUtils.asBoolean( "${booleanValue}", variableSpace ) ); }