ScopeNode implements Scope { List<Object> getParentScopesNames() { List<Object> parentScopesNames = new ArrayList<>(); for (ScopeNode parentScope : parentScopes) { parentScopesNames.add(parentScope.getName()); } return parentScopesNames; } ScopeNode(Object name); @Override Object getName(); @Override boolean equals(Object o); @Override int hashCode(); @Override ScopeNode getParentScope(); @SuppressWarnings({"unused", "used by generated code"}) @Override ScopeNode getParentScope(Class<A> scopeAnnotationClass); @SuppressWarnings({"unused", "used by generated code"}) @Override ScopeNode getRootScope(); @Override Scope supportScopeAnnotation(Class<? extends Annotation> scopeAnnotationClass); @Override boolean isScopeAnnotationSupported(Class<? extends Annotation> scopeAnnotationClass);  }
@Test public void testGetParentScopeNames_shouldReturnParentNames_whenThereAreNoParents() { ScopeNode parentScope = new ScopeImpl("root"); final List<Object> parentScopesNames = parentScope.getParentScopesNames(); assertThat(parentScopesNames.size(), is(0)); }