code: private static String getVariableName(String value) {
          assert value.charAt(0) == '{';
          assert value.charAt(value.length() - 1) == '}';
          return value.substring(1, value.length() - 1);
      }
docs: thrown if the trailing '}' is missing.