How Do Instructors Specify Their Tests?
For the Java grading plug-in, standard JUnit test classes are used (as *.java source files to be compiled against student code). You can have as many as you want for a given assignment. There are no limitations except for some basic naming conventions. Students use the same format for the test cases they write. JUnit is widespread enough that there are many useful resources for teaching and learning how it works.