void (@Nullable KtClassOrObject origin) { assertNotNull(origin); KotlinAsJavaSupportBase<?> javaSupport = (KotlinAsJavaSupportBase<?>) KotlinAsJavaSupport.getInstance(origin.getProject()); PsiClass lightClass1 = javaSupport.createLightClass(origin).getValue(); PsiClass lightClass2 = javaSupport.createLightClass(origin).getValue(); assertNotNull(lightClass1); assertNotNull(lightClass2); // If the same light class is returned twice, it means some caching was introduced and this test no longer makes sense. // Any other way of obtaining light classes should be used, which bypasses caches assertNotSame(lightClass1, lightClass2); assertEquals(lightClass1, lightClass2); assertEquals(lightClass1.hashCode(), lightClass2.hashCode()); }