### Question:
ToolSpec { public String getAnnotation() { String result = null; Element element = doc.getDocumentElement(); Node node = element.getFirstChild(); while (node != null) { if ((node.getNodeType() == Node.ELEMENT_NODE) && ("annotation".equals(node.getNodeName()))) { result = node.getNodeValue(); break; } node = node.getNextSibling(); } return result; } ToolSpec();  ToolSpec(InputStream in);  ToolSpec(InputStream in, boolean validate);  ToolSpec(Document d); ExtendedDocumentBuilder getDocumentBuilder(); boolean isValidInputStream(String id); Element getElementById(String id); boolean hasHandler(); Tool getHandler(); Tool getHandler(ClassLoader loader); Element getStreams(); List<String> getInstreamIds(); List<String> getOutstreamIds(); Element getUsage(); void transform(InputStream stylesheet, OutputStream out); Element getPipeline(); List<Element> getUsageForms(); String getStreamRefName(String streamId); String getParameterDefault(String name); String getAnnotation();  }### Answer:
@Test public void testConstructFromInputStream() { String tsSource = "parser/resources/testtool.xml"; try { toolSpec = new ToolSpec(getClass().getResourceAsStream(tsSource), false); } catch (ToolException e) { throw new RuntimeException(e); } assertNull(toolSpec.getAnnotation()); }
@Test public void testConstructFromInputStream() { String tsSource = "parser/resources/testtool.xml"; try { toolSpec = new ToolSpec(getClass().getResourceAsStream(tsSource), false); } catch (ToolException e) { throw new RuntimeException(e); } assertTrue(toolSpec.getAnnotation() == null); }