boolean (TestIdentifier testIdentifier) { UniqueId id = UniqueId.parse(testIdentifier.getUniqueId()); List<UniqueId.Segment> segments = id.getSegments(); if (segments.isEmpty()) return false; UniqueId.Segment lastSegment = segments.get(segments.size() - 1); return lastSegment.getType().equals("engine") || myRootName != null && myRootName.equals(lastSegment.getValue()); }