### Question:
DollarBraceDecoder { public static String replaceTokens(String string, String replacement) { List<String> tokens = getTokens(string); for (String token : tokens) { string = string.replace("${" + token + "}", replacement); } return string; }  static List<String> getTokens(String string); static String replaceTokens(String string, String replacement); static final String PATTERN; }### Answer:
@Test public void test_replaceTokens() { assertEquals("aaaaaa", DollarBraceDecoder.replaceTokens("aaaaaa", "?")); assertEquals("aaa?aaa", DollarBraceDecoder.replaceTokens("aaa${x}aaa", "?")); assertEquals("aaa?a?aa", DollarBraceDecoder.replaceTokens("aaa${x}a${x}aa", "?")); assertEquals("aaa?a?a?a", DollarBraceDecoder.replaceTokens("aaa${x}a${x}a${y}a", "?")); assertEquals("test-?.txt", DollarBraceDecoder.replaceTokens( "test-${currentDate.date?string('yyyy')}.txt", "?")); assertEquals("test-?.txt", DollarBraceDecoder.replaceTokens( "test-${currentDate.date?string('yyyy-MM-dd-HH-mm-sss')}.txt", "?")); assertEquals("test-?.txt", DollarBraceDecoder.replaceTokens( "test-${currentDate.date?string(\"yyyy-MM-dd-HH-mm-sss\")}.txt", "?")); assertEquals("INSERT INTO ORDERS VALUES(?, ?, ?)", DollarBraceDecoder.replaceTokens( "INSERT INTO ORDERS VALUES(${orderDetail.orderNum + \"-\" + product.ID}, ${accounts[0].USERID[2]}, ${orderDetail.date})", "?")); }