public void canLocateScripts() throws Exception {
CoreServerMBean coreServer = Mockito.mock(CoreServerMBean.class);
Mockito.when(coreServer.getEarDeploymentDir()).thenReturn(tmpDir);
RhqDownloadsScriptSourceProvider provider = new RhqDownloadsScriptSourceProvider(coreServer);
URI location = new URI("rhq://downloads/test-script.js");
Reader rdr = provider.getScriptSource(location);
try {
String contents = StreamUtil.slurp(rdr);
assertEquals(contents, EXPECTED_CONTENTS, "Unexpected script loaded");
} finally {