// Path: src/uk/ac/open/lts/webmaths/mathjax/MathJaxNodeExecutable.java
// public static class ConversionResults
// {
// 	private String svg;
// 	private String mathml;
// 
// 	protected ConversionResults(String svg, String mathMl)
// 	{
// 		this.svg = svg;
// 		this.mathml = mathMl;
// 	}
// 
// 	/**
// 	 * @return SVG code (as string)
// 	 */
// 	public String getSvg()
// 	{
// 		return svg;
// 	}
// 
// 	/**
// 	 * @return MathJax code (empty string if none)
// 	 */
// 	public String getMathml()
// 	{
// 		return mathml;
// 	}
// }


import static org.junit.Assert.*;
import java.io.IOException;
import java.util.*;
import org.junit.*;
import uk.ac.open.lts.webmaths.mathjax.MathJaxNodeExecutable.ConversionResults;
		// Create first instance, set to crash.
		MathJaxNodeInstanceMock instance = new MathJaxNodeInstanceMock(1);
		executable.addInstance(instance);
		instance.addLines(new String[] { "crash" });
		instance.setStderr("This\nis\nstderr");

		try
		{
			executable.convertEquation(new InputTexDisplayEquation("x", null));
			fail();
		}
		catch(IOException e)
		{
			// Message includes normal exception message with stderr appended.
			assertEquals("Failed during readLine\nThis\nis\nstderr", e.getMessage());
		}

		// Check it closes the first instance.
		assertEquals(
			"*sendLine:TeX\n"
			+ "*sendLine:x\n"
			+ "*sendLine:\n"
			+ "*flush\n"
			+ "*closeWithStderr\n", instance.getActions());

		// Check it spins up a new instance for next equation.
		MathJaxNodeInstanceMock instance2 = new MathJaxNodeInstanceMock(2);
		executable.addInstance(instance2);
		instance2.addLines(RESULT_SUCCESS);
		executable.convertEquation(new InputTexDisplayEquation("x", null));
// Path: src/uk/ac/open/lts/webmaths/mathjax/MathJaxNodeExecutable.java
// public static class ConversionResults
// {
// 	private String svg;
// 	private String mathml;
// 
// 	protected ConversionResults(String svg, String mathMl)
// 	{
// 		this.svg = svg;
// 		this.mathml = mathMl;
// 	}
// 
// 	/**
// 	 * @return SVG code (as string)
// 	 */
// 	public String getSvg()
// 	{
// 		return svg;
// 	}
// 
// 	/**
// 	 * @return MathJax code (empty string if none)
// 	 */
// 	public String getMathml()
// 	{
// 		return mathml;
// 	}
// }


// Path: test/uk/ac/open/lts/webmaths/mathjax/TestMathJaxNodeExecutable.java
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.*;
import org.junit.*;
import uk.ac.open.lts.webmaths.mathjax.MathJaxNodeExecutable.ConversionResults;

		// Create first instance, set to crash.
		MathJaxNodeInstanceMock instance = new MathJaxNodeInstanceMock(1);
		executable.addInstance(instance);
		instance.addLines(new String[] { "crash" });
		instance.setStderr("This\nis\nstderr");

		try
		{
			executable.convertEquation(new InputTexDisplayEquation("x", null));
			fail();
		}
		catch(IOException e)
		{
			// Message includes normal exception message with stderr appended.
			assertEquals("Failed during readLine\nThis\nis\nstderr", e.getMessage());
		}

		// Check it closes the first instance.
		assertEquals(
			"*sendLine:TeX\n"
			+ "*sendLine:x\n"
			+ "*sendLine:\n"
			+ "*flush\n"
			+ "*closeWithStderr\n", instance.getActions());

		// Check it spins up a new instance for next equation.
		MathJaxNodeInstanceMock instance2 = new MathJaxNodeInstanceMock(2);
		executable.addInstance(instance2);
		instance2.addLines(RESULT_SUCCESS);
		executable.convertEquation(new InputTexDisplayEquation("x", null));
		assertEquals(