void (final boolean isSuite, final String testName, final String locationHint, final String metaInfo, String id, String parentNodeId) { myTreeBuildBeforeStart = true; myBuildTreeRunnables.add(() -> { final SMTestProxy testProxy = isSuite ? createSuite(testName, locationHint, metaInfo, id, parentNodeId) : createProxy(testName, locationHint, metaInfo, id, parentNodeId); testProxy.setTreeBuildBeforeStart(); if (myLocator != null) { testProxy.setLocator(myLocator); } myEventPublisher.onSuiteTreeNodeAdded(testProxy, isSuite, id, parentNodeId); for (SMTRunnerEventsListener adapter : myListenerAdapters) { adapter.onSuiteTreeNodeAdded(testProxy, isSuite, id, parentNodeId); } //ensure root node gets the flag when merged with a single child testProxy.getParent().setTreeBuildBeforeStart(); }); }