I have a rule defined for "TemporaryFolder" as below:
@Rule
public TemporaryFolder xyzFolder = new TemporaryFolder();
and in method:
private void testMethod() {
File testFile = xyzFolder.newFile("test");
}
But getting exception as:
java.lang.Exception: The @Rule 'xyzFolder' must implement MethodRule or TestRule.