void () { myFixture.addClass("package java.lang; public abstract class Record {" + "public abstract boolean equals(Object obj);" + "public abstract int hashCode();" + "public abstract String toString();" + "}"); myFixture.configureByText("A.java", """ record Point(int x) { public Point { int x<caret>1 = 0 }}"""); PsiDeclarationStatement decl = PsiTreeUtil.getParentOfType(myFixture.getElementAtCaret(), PsiDeclarationStatement.class); assertNotNull(decl); ReassignVariableUtil.registerDeclaration(getEditor(), decl, getTestRootDisposable()); ReassignVariableUtil.reassign(getEditor()); }