@Test
public void testDetermineScriptType() {

    // 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());
}