### Question:
HamletImpl extends HamletSpec { public static <E extends SCRIPT> E setScriptSrc(E e, String src) { if (src.endsWith(".js")) { e.$type("text/javascript"); } e.$src(src); return e; } HamletImpl(PrintWriter out, int nestLevel, boolean wasInline); int nestLevel(); boolean wasInline(); void setWasInline(boolean state); PrintWriter getWriter(); Generic<T> root(String name, EnumSet<EOpt> opts); Generic<T> root(String name); static String[] parseSelector(String selector); static E setSelector(E e, String selector); static E setLinkHref(E e, String href); static E setScriptSrc(E e, String src);  }### Answer:
@Test public void testSetScriptSrc() { SCRIPT script = mock(SCRIPT.class); HamletImpl.setScriptSrc(script, "uri"); HamletImpl.setScriptSrc(script, "script.js"); verify(script).$src("uri"); verify(script).$type("text/javascript"); verify(script).$src("script.js"); verifyNoMoreInteractions(script); }