void () { myFixture.addClass(""" package one; public class Test { public static class A { } static class B extends A { } public static class C1 extends B { } public static class C2 extends B { } }"""); myFixture.addClass(""" package another; public class Test2 { private static class D1 extends one.Test.C1 { } private static class D2 extends one.Test.C2 { } }"""); assertSize(5, ClassInheritorsSearch.search(myFixture.findClass("one.Test.A")).findAll()); assertSize(4, ClassInheritorsSearch.search(myFixture.findClass("one.Test.B")).findAll()); }