void () { final String in = """ class A { private int i, /*1*/j, k; void m() { int i, j,// 2 k; } } """; final String what1 = "int '_i+;"; final String by1 = "float $i$;"; assertEquals(""" class A { private float i, /*1*/j, k; void m() { float i, j,// 2 k; } } """, replace(in, what1, by1)); final String what2 = "int '_a, '_b, '_c = '_d?;"; final String by2 = "float $a$, $b$, $c$ = $d$;"; assertEquals(""" class A { private float i, j, k; void m() { float i, j, k; } } """, replace(in, what2, by2)); }