void () { doTest(""" class Foobar extends Foo { private int bar; <caret>\s } class Foo { protected int foo; } """, """ class Foobar extends Foo { private int bar; @Override public String toString() { return "Foobar{" + "foo=" + foo + ", bar=" + bar + '}'; } } class Foo { protected int foo; } """, ReplacePolicy.getInstance()); }