@Test
public void import_library_from_stack_imports_the_stack()
{
DocumentLinker linker = mockDocumentLinker();
JavaScriptStackSource stackSource = mockJavaScriptStackSource();
JavaScriptStackPathConstructor pathConstructor = mockJavaScriptStackPathConstructor();
trainForEmptyCoreStack(linker, stackSource, pathConstructor);
Asset library1 = mockAsset("mylib1.js");
Asset library2 = mockAsset("mylib2.js");
JavaScriptStack mystack = mockJavaScriptStack();
expect(stackSource.getStackNames()).andReturn(Arrays.asList("mystack"));
expect(stackSource.getStack("mystack")).andReturn(mystack).atLeastOnce();
expect(mystack.getStacks()).andReturn(Collections.<String> emptyList());
expect(mystack.getJavaScriptLibraries()).andReturn(Arrays.asList(library1, library2));
expect(pathConstructor.constructPathsForJavaScriptStack("mystack")).andReturn(