Hint: Start test names with 'should' and describe behavior [OK]
Common Mistakes:
Using vague names like 'test1' or 'check'
Starting names with 'run' without context
Not using camelCase for readability
2. Which of the following is a syntactically correct JUnit 5 test method name?
easy
A. 2ShouldReturnFalseWhenInputIsNull
B. shouldReturnFalseWhenInputIsNull
C. should return false when input is null
D. should-return_false_when_input_is_null
Solution
Step 1: Recall Java identifier rules for method names
Java method names must be valid identifiers: start with letter/$_ , no spaces, hyphens, or starting digits; conventionally camelCase.
Step 2: Check each option
shouldReturnFalseWhenInputIsNull uses valid camelCase. The option starting with '2' can't start with digit. The option with hyphen '-' is invalid. The option with spaces is invalid.