I just want to know why the test cases (test methods) should be public like this
public class SpiceLoginTest {
@Test
public void testShouldVerifyLoginRequest() {
}
}
but if I remove public access specifier from this method
@Test
void testShouldVerifyLoginRequest() {
}
Output: java.lang.Exception: Method testShouldVerifyLoginRequest() should be public
so
What is happening behind the scenes?
Is it using reflection or what?