I have the following Test:
public void testStringReplace()
{
final String placeholder = "$ph$";
final String template = "<test>" + placeholder + "</test>";
final String result = "<test>Hello!</test>";
String copyOfTemplate = template;
copyOfTemplate.replace(placeholder, "Hello!");
if(!copyOfTemplate.equals(result));
fail();
}
The test always fails, but why? How do I have to define copyOfTemplate, to be able to change it? Or am I missing some other detail here?

if(!copyOfTemplate.equals(result));<-- Remove that semicolon at the end!