@Test
public void jsInjectorProducesValidScriptTag() throws IOException {

    String pathToJSInjectionFile = getClass().getResource("/eventsRecorder.js").getFile();
    JavascriptInjectionPreparator javascriptInjectionPreparator = new JavascriptInjectionPreparator(pathToJSInjectionFile);
    String outputJS = javascriptInjectionPreparator.getInjectionCode();
    assertTrue(outputJS.startsWith("<script>"));
    assertTrue(outputJS.endsWith("</script>"));
}