boolean (@NotNull AssertHint assertHint) { final PsiClass clazz = assertHint.getMethod().getContainingClass(); if (clazz == null) return false; final PsiMethod[] methods = clazz.findMethodsByName("assertInstanceOf", true); final PsiParameterList originalParameters = assertHint.getMethod().getParameterList(); for (final PsiMethod method : methods) { final PsiParameterList parameters = method.getParameterList(); if (parameters.getParametersCount() - 1 != originalParameters.getParametersCount()) { continue; // assertTrue(condition, ?, ?, ...) vs assertInstanceOf(param1, param2, ?, ?, ...) } if (originalParameters.getParametersCount() == 1) return true; final PsiParameter[] originalParams = originalParameters.getParameters(); final PsiParameter[] params = parameters.getParameters(); if (IntStream.range(1, originalParams.length) .allMatch(i -> Objects.equals(originalParams[i].getType(), params[i + 1].getType()))) { return true; } } return false; }