### Question:
TemplateInstanceNode extends BxmlNodeWithToken { @Override public boolean hasEndOfStream() { return super.hasEndOfStream() || templateNode.hasEndOfStream(); } TemplateInstanceNode(BinaryReader binaryReader, ChunkHeader chunkHeader, BxmlNode parent); TemplateNode getTemplateNode(); @Override boolean hasEndOfStream(); @Override void accept(BxmlNodeVisitor bxmlNodeVisitor);  }### Answer:
@Test public void testHasEndOfStream() { when(templateNode.hasEndOfStream()).thenReturn(true).thenReturn(false); assertTrue(templateInstanceNode.hasEndOfStream()); assertFalse(templateInstanceNode.hasEndOfStream()); }