### Question:
TokenParser { public String parse(String text) { return parse(text, tokenHandler); } TokenParser(String openToken, String closeToken);  TokenParser(String openToken, String closeToken, UnaryOperator<String> tokenHandler); String parse(String text); String parse(String text, UnaryOperator<String> tokenHandler); String parse(String text, UnaryOperator<String> textHandler,
      UnaryOperator<String> tokenHandler);  }### Answer:
@Test public void parse() { TokenParser parser = new TokenParser("${", "}", this::handle); String value = parser.parse(null); Assert.assertEquals("", value); value = parser.parse("ax"); Assert.assertEquals("ax", value); value = parser.parse("ax${a}"); Assert.assertEquals("axA", value); value = parser.parse("ax${a}}"); Assert.assertEquals("axA}", value); value = parser.parse("ax${a\\}x}"); Assert.assertEquals("axA}X", value); value = parser.parse("ax\\${ax}${ax}"); Assert.assertEquals("ax${ax}AX", value); value = parser.parse("ax$\\{ax}${ax}"); Assert.assertEquals("ax$\\{ax}AX", value); value = parser.parse("ax$${ax}${ax}"); Assert.assertEquals("ax$AXAX", value); }