when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList());
when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList()); assertThat(rscCaptor.getValue().getTargetMethodName(), is(methodInstrumentationConfig.getTargetMethodName())); assertThat(rscCaptor.getValue().getReturnType(), is(methodInstrumentationConfig.getReturnType())); assertThat(rscCaptor.getValue().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList()));
when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList()); assertThat(rscCaptor.getValue().getTargetMethodName(), is(methodInstrumentationConfig.getTargetMethodName())); assertThat(rscCaptor.getValue().getReturnType(), is(methodInstrumentationConfig.getReturnType())); assertThat(rscCaptor.getValue().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList()));
when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList()); assertThat(rscCaptor.getValue().getTargetMethodName(), is(methodInstrumentationConfig.getTargetMethodName())); assertThat(rscCaptor.getValue().getReturnType(), is(methodInstrumentationConfig.getReturnType())); assertThat(rscCaptor.getValue().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList()));
when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList()); assertThat(rscCaptor.getValue().getTargetMethodName(), is(methodInstrumentationConfig.getTargetMethodName())); assertThat(rscCaptor.getValue().getReturnType(), is(methodInstrumentationConfig.getReturnType())); assertThat(rscCaptor.getValue().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList()));
assertThat(rsc.getSensorIds()[0], is(sensorId)); assertThat(rsc.getSensorIds()[1], is(invocationSensorId)); assertThat(rsc.isStartsInvocation(), is(true)); assertThat(rsc.isPropertyAccess(), is(true)); assertThat(rsc.getPropertyAccessorList(), hasItem(propertyPathStart));
when(sensorInstrumentationPoint.getId()).thenReturn(rscId); when(sensorInstrumentationPoint.getSensorIds()).thenReturn(sensorIds); when(sensorInstrumentationPoint.isStartsInvocation()).thenReturn(false); when(sensorInstrumentationPoint.getSettings()).thenReturn(Collections.<String, Object> singletonMap("key", "value")); when(sensorInstrumentationPoint.getPropertyAccessorList()).thenReturn(Collections.<PropertyPathStart> emptyList()); assertThat(rscCaptor.getValue().getTargetMethodName(), is(methodInstrumentationConfig.getTargetMethodName())); assertThat(rscCaptor.getValue().getReturnType(), is(methodInstrumentationConfig.getReturnType())); assertThat(rscCaptor.getValue().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList()));
this.copyInfo(rsc, config); rsc.setId(sensorInstrumentationPoint.getId()); rsc.setStartsInvocation(sensorInstrumentationPoint.isStartsInvocation()); rsc.setSettings(sensorInstrumentationPoint.getSettings());
assertThat(rsc.getSensorIds()[0], is(sensorId)); assertThat(rsc.getSensorIds()[1], is(invocationSensorId)); assertThat(rsc.isStartsInvocation(), is(true)); assertThat(rsc.isPropertyAccess(), is(false));