How To Write Junit Test Cases With Example . 1)first create a maven project. Please follow the following steps to know, how to write junit test case for try catch block or i can say to know how to write junit test case for exception. HOW TO WRITE JUNIT TEST CASES DEMO IN TAMIL YouTube from www.youtube.com Test runner is used for executing the test cases. In short, test templates are a powerful generalization of junit 5's parameterized and repeated tests. In this example, we will create a junit test case to check if the string starts with the upper case or not.