Answer for Q2:
Template:
public class __tester__ {
static String SEPARATOR = "#<ab@17943918#@>#";
Object __ = {{ STUDENT_ANSWER }};
public static void main(String[] args) {
__tester__ main = new __tester__();
main.runTests();
}
public void runTests() {
{% for testCase in TESTCASES %}
{
{{ testCase.testcode }};
{% if not loop.last %}
System.out.println(SEPARATOR);
{% endif %}
}
{% endfor %}
}
}
Test case:
System.out.println(Boolean.TRUE.equals(__));