public void notifyBeforeTestMethod(Object testInstance, Method testMethod, Object[] arguments) {
MockRepository.putAdditionalState(Keys.CURRENT_TEST_INSTANCE, testInstance);
MockRepository.putAdditionalState(Keys.CURRENT_TEST_METHOD, testMethod);
MockRepository.putAdditionalState(Keys.CURRENT_TEST_METHOD_ARGUMENTS, arguments);
for (int i = 0; i < powerMockTestListeners.length; i++) {
final PowerMockTestListener testListener = powerMockTestListeners[i];
try {
testListener.beforeTestMethod(testInstance, testMethod, arguments);
} catch (Exception e) {
throw new RuntimeException(String.format(ERROR_MESSAGE_TEMPLATE, "beforeTestMethod", testListener), e);
}
}
}