void (boolean shouldBeWrapped, KtDeclaration declaration, PsiMethod psiMethod) { if (shouldBeWrapped) { assertNotNull(String.format("Failed to wrap declaration '%s' to method", declaration.getText()), psiMethod); assertInstanceOf(psiMethod, KtLightMethod.class); assertEquals("Invalid original element for generated method", ((KtLightMethod) psiMethod).getKotlinOrigin(), declaration); } else { assertNull("There should be no wrapper for given method", psiMethod); } }