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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]);
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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]); 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())); ArgumentCaptor<Map> captor = ArgumentCaptor.forClass(Map.class);
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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]); 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())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]); 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())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]); 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())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
assertThat(rsc.getSensorIds().length, is(1)); assertThat(rsc.getSensorIds()[0], is(sensorId)); assertThat(rsc.getSettings(), is(settings)); assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
assertThat(rsc.getSensorIds().length, is(1)); assertThat(rsc.getSensorIds()[0], is(sensorId)); assertThat(rsc.getSettings(), is(settings)); assertThat(instrumentationConfig.getSpecialInstrumentationPoint(), is(nullValue()));
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(methodSensorTypeConfig.getId()).thenReturn(sensorIds[0]); 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())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
rsc.setId(sensorInstrumentationPoint.getId()); rsc.setStartsInvocation(sensorInstrumentationPoint.isStartsInvocation()); rsc.setSettings(sensorInstrumentationPoint.getSettings());