void (UsageType expected, PsiClass target) { UsageTarget[] targets = {new PsiElement2UsageTargetAdapter(target)}; PsiElement element = myFixture.getReferenceAtCaretPositionWithAssertion().getElement(); UsageType usageType = new JavaUsageTypeProvider().getUsageType(element, targets); assertEquals(expected, usageType); }