JavaScriptStackSource stackSource = mockJavaScriptStackSource();
JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
trainForCoreStack(linker, stackSource, pathConstructor);
JavaScriptStack stack = mockJavaScriptStack();
StylesheetLink stylesheetLink = new StylesheetLink("stack.css");
expect(stackSource.getStack("custom")).andReturn(stack);
expect(pathConstructor.constructPathsForJavaScriptStack("custom")).andReturn(
CollectionFactory.newList("stack.js"));
expect(stack.getStylesheets()).andReturn(CollectionFactory.newList(stylesheetLink));
expect(stack.getInitialization()).andReturn("customInit();");
List<String> stacks = Collections.emptyList();
expect(stack.getStacks()).andReturn(stacks);
linker.addScriptLink("stack.js");
linker.addStylesheetLink(stylesheetLink);
linker.addScript(InitializationPriority.IMMEDIATE, "stackInit();");