prepareConfigurationMockMethod(config, InstrumentationTestClass.class, methodName, String.class); doAnswer(SPECIAL_INSTRUMENTER_ANSWER).when(instrumenterFactory).getMethodVisitor(eq(sip), Matchers.<MethodVisitor> any(), anyInt(), anyString(), anyString(), anyBoolean()); when(config.getAllInstrumentationPoints()).thenReturn(Collections.<IMethodInstrumentationPoint> singleton(sip)); prepareWriter(cr, null, false, config); cr.accept(classInstrumenter, ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG); assertThat(classInstrumenter.isByteCodeAdded(), is(true)); Object testClass = this.createInstance(TEST_CLASS_FQN, b); doAnswer(new Answer<Object>() { @Override Object result = this.callMethod(testClass, methodName, parameters);
prepareConfigurationMockMethod(config, InstrumentationTestClass.class, methodName, String.class); doAnswer(SPECIAL_INSTRUMENTER_ANSWER).when(instrumenterFactory).getMethodVisitor(eq(sip), Matchers.<MethodVisitor> any(), anyInt(), anyString(), anyString(), anyBoolean()); when(config.getAllInstrumentationPoints()).thenReturn(Collections.<IMethodInstrumentationPoint> singleton(sip)); prepareWriter(cr, null, false, config); cr.accept(classInstrumenter, ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG); assertThat(classInstrumenter.isByteCodeAdded(), is(true)); Object testClass = this.createInstance(TEST_CLASS_FQN, b); doAnswer(new Answer<Object>() { @Override Object result = this.callMethod(testClass, methodName, parameters);