rsc.setSettings(sensorInstrumentationPoint.getSettings()); if (CollectionUtils.isNotEmpty(sensorInstrumentationPoint.getPropertyAccessorList())) { rsc.setPropertyAccessorList(new CopyOnWriteArrayList<PropertyPathStart>(sensorInstrumentationPoint.getPropertyAccessorList())); } else { rsc.setPropertyAccessorList(Collections.<PropertyPathStart> emptyList());
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.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(connection.isConnected()).thenReturn(true); 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); verify(connection, times(1)).isConnected();
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().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
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().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
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().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
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().isStartsInvocation(), is(sensorInstrumentationPoint.isStartsInvocation())); assertThat(rscCaptor.getValue().getSettings(), is(sensorInstrumentationPoint.getSettings())); assertThat(rscCaptor.getValue().getPropertyAccessorList(), is(sensorInstrumentationPoint.getPropertyAccessorList())); verifyNoMoreInteractions(hookDispatcherMapper, connection, classHashHelper);
assertThat(rsc.isStartsInvocation(), is(true)); assertThat(rsc.isPropertyAccess(), is(true)); assertThat(rsc.getPropertyAccessorList(), hasItem(propertyPathStart));