assertEquals("new configuration hasn't been used:", 1, stats.getMethodCallStatistic("yyy").getCalls());
}
@Test
public void testConfigureInstantiateWithIncompatibleFetchConfiguration() throws Exception {
SpyDefinition sdef1 = spy.instrument("test")
.include(spy.byMethod(BytecodeInstrumentationFixture.TCLASS1, "trivialMethod"))
.onSubmit(spy.zorkaStats("test", "test:name=TestClass1", "stats", "xxx"));
agentInstance.getClassTransformer().add(sdef1);
Object obj = instantiate(agentInstance.getClassTransformer(), BytecodeInstrumentationFixture.TCLASS1);
SpyDefinition sdef2 = spy.instrument("test")
.onEnter(spy.fetchThread("THREAD"))
.include(spy.byMethod(BytecodeInstrumentationFixture.TCLASS1, "trivialMethod"))
.onSubmit(spy.zorkaStats("test", "test:name=TestClass1", "stats", "yyy"));
agentInstance.getClassTransformer().add(sdef2);