I\'m looking for something to achieve the following:
String s = \"hello {}!\"; s = generate(s, new Object[]{ \"world\" }); assertEquals(s, \"hello world!\");
You won't need a library; if you are using a recent version of Java, have a look at String.format:
String.format
String.format("Hello %s!", "world");