source: class ScriptEnginePersonAttributeDaoTest extends AbstractDefaultAttributePersonAttributeDao {
  
      @Autowired
      private ApplicationContext applicationContext;
      private ScriptEnginePersonAttributeDao dao;
  
      @Test
      public void testDetermineScriptType() {
  
target:         // test with classpath resource
          assertEquals(ScriptEnginePersonAttributeDao.SCRIPT_TYPE.RESOURCE, new ScriptEnginePersonAttributeDao("SampleScriptedJavascriptPersonAttributeDao.js").getScriptType());
          assertEquals(ScriptEnginePersonAttributeDao.SCRIPT_TYPE.FILE, new ScriptEnginePersonAttributeDao("src/test/resources/SampleScriptedJavascriptPersonAttributeDao.js").getScriptType());
          // if file doesn't exist, assume script is contents of string
          assertEquals(ScriptEnginePersonAttributeDao.SCRIPT_TYPE.CONTENTS, new ScriptEnginePersonAttributeDao("doesnotexist/src/test/resources/SampleScriptedJavascriptPersonAttributeDao.js").getScriptType());
      }
  
  }