StacktraceBuilder extends RobotDefaultAgentEventListener { @Override public void handleVariables(final VariablesEvent event) { stacktrace.updateVariables(event.getVariables()); } StacktraceBuilder(final Stacktrace stacktrace, final ElementsLocator locator,
            final RobotBreakpointSupplier breakpointSupplier); @Override void handleSuiteStarted(final SuiteStartedEvent event); @Override void handleTestStarted(final TestStartedEvent event); @Override void handleKeywordAboutToStart(final KeywordStartedEvent event); @Override void handleKeywordStarted(final KeywordStartedEvent event); @Override void handleKeywordAboutToEnd(final KeywordEndedEvent event); @Override void handleKeywordEnded(final KeywordEndedEvent event); @Override void handleTestEnded(final TestEndedEvent event); @Override void handleSuiteEnded(final SuiteEndedEvent event); @Override void handleResourceImport(final ResourceImportEvent event); @Override void handleVariables(final VariablesEvent event); @Override void handleClosed();  }
@Test public void variablesAreUpdated_whenVariablesEventIsHandled() { final Stacktrace stack = spy(new Stacktrace()); final StacktraceBuilder builder = new StacktraceBuilder(stack, mock(ElementsLocator.class), new RobotBreakpointSupplier()); final List<Map<Variable, VariableTypedValue>> variables = newArrayList(newHashMap()); builder.handleVariables(new VariablesEvent(variables, "")); verify(stack).updateVariables(same(variables)); }