### Question:
DollarBraceDecoder { public static List<String> getTokens(String string) { List<String> tokens = new ArrayList<String>(); Matcher m = pattern.matcher(string); while (m.find()) { int start = m.start(); int end = m.end(); String token = string.substring((start + 2), (end - 1)); tokens.add(token); } return tokens; }  static List<String> getTokens(String string); static String replaceTokens(String string, String replacement); static final String PATTERN; }### Answer:
@Test public void test_getTokens() { assertEquals("[]", DollarBraceDecoder.getTokens("aaaaaa").toString()); assertEquals("[x]", DollarBraceDecoder.getTokens("aaa${x}aaa").toString()); assertEquals("[x, x]", DollarBraceDecoder.getTokens("aaa${x}a${x}aa").toString()); assertEquals("[x, x, y]", DollarBraceDecoder.getTokens("aaa${x}a${x}a${y}a").toString()); assertEquals("[x, x, y]", DollarBraceDecoder.getTokens("a}aa${x}a${x}a${y}a").toString()); assertEquals("[a${x, x, y]", DollarBraceDecoder.getTokens("a}a${a${x}a${x}a${y}a").toString()); assertEquals("[a${x, x, y]", DollarBraceDecoder.getTokens("a}a${a${x}a${x}a${y}a${").toString()); assertEquals("[orderDetail.orderNum, accounts[0].USERID[2], orderDetail.date]", DollarBraceDecoder.getTokens( "INSERT INTO ORDERS VALUES(${orderDetail.orderNum}, ${accounts[0].USERID[2]}, ${orderDetail.date})").toString()); }