### Question:
CtEntry extends Entry { @Override public Node getLastNode() { return parent == null ? null : parent.getCurNode(); } CtEntry(ResourceWrapper resourceWrapper, ProcessorSlot<Object> chain, Context context); @Override void exit(int count, Object... args); @Override void whenTerminate(BiConsumer<Context, Entry> handler); @Override Node getLastNode();  }### Answer:
@Test public void testGetLastNode() { Context context = new NullContext(); CtEntry entry = new CtEntry(new StringResourceWrapper("testGetLastNode", EntryType.IN), null, context); assertNull(entry.parent); assertNull(entry.getLastNode()); Entry parentEntry = mock(Entry.class); Node node = mock(Node.class); when(parentEntry.getCurNode()).thenReturn(node); entry.parent = parentEntry; assertSame(node, entry.getLastNode()); }