void () { String s1 = """ class Foo { void foo(final int i,final int i2, final int i3) { final int x = 5; } }"""; String s2 = "final '_type 'var = '_init?;"; String s3 = "$type$ $var$ = $init$;"; String expected = """ class Foo { void foo(int i,int i2, int i3) { int x = 5; } }"""; assertEquals(expected, replace(s1, s2, s3)); }