/** * Instrument the supplied {@code target} object's method which has the given name. Subsequent * calls to {@code target}'s given method will be recorded against the statistics for this * {@code Test}. * * @param target Object to instrument. * @param methodName method name to instrument * @throws NonInstrumentableTypeException If {@code target} could not be instrumented. * @since 3.2.1 */ public final void record(Object target, String methodName) throws NonInstrumentableTypeException { if (StringUtils.isNotEmpty(context)) { record(target, new MethodNameFilter(methodName)); } }
@BeforeClass public static void beforeProcess() { request = new HTTPRequest(); try { test.record(request); } catch (NonInstrumentableTypeException e) { } }