ActivitiRule fails if test methods are declared in a super class

Description

There is a bug in TestHelper when it is trying to setup Deployment annotations. The current TestHelper code looks for the test method on the test class by searching for it as a declared method:

The problem happens when the test method is not declared on the base test class, but on a parent of that class. For example, if you have the following setup, you will get an exception in TestHelper because it won't be able to find the test method (this example is made up and doesn't make a lot of sense for a real system, but it demonstrates the problem):

I believe that the fix for this is simple. TestHelper simply needs to call getMethod() rather than getDeclaredMethod(). The method is guaranteed to be declared in either the test class or in one of its parents, but it doesn't really matter which one. We just need to get back the Method reference.

Environment

None

Assignee

Joram Barrez

Reporter

Brian Showers

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure