void () { String s43 = """ public @Deprecated class Foo implements Comparable<Foo> { int x; void m(){} }"""; String s44 = "class 'Class implements '_Interface { '_Content* }"; String s45 = """ @MyAnnotation class $Class$ implements $Interface$ { $Content$ }"""; String expectedResult16 = """ @MyAnnotation public @Deprecated class Foo implements Comparable<Foo> { int x; void m(){} }"""; assertEquals( "Preserving var modifiers and generic information in type during replacement", expectedResult16, replace(s43, s44, s45, true) ); String in1 = """ public class A { public class B {} }"""; String what1 = """ class '_A { class '_B {} }"""; String by1 = """ class $A$ { private class $B$ {} }"""; String expected1 = """ public class A { private class B {} }"""; assertEquals("No illegal modifier combinations during replacement", expected1, replace(in1, what1, by1)); }