void () { String in = "<input class=\"other\" type=\"text\" ng-model=\"someModel\" placeholder=\"Some placeholder\" />"; String what = "<input '_a* />"; String by = "<input $a$ id=\"someId1\" />"; String expected = "<input class=\"other\" type=\"text\" ng-model=\"someModel\" placeholder=\"Some placeholder\" id=\"someId1\" />"; assertEquals(expected, replace(in, what, by)); }