use of org.eclipse.hono.util.TelemetryExecutionContext in project hono by eclipse.
the class AbstractProtocolAdapterBaseTest method testGetDownstreamPropertiesAddsStandardProperties.
/**
* Verifies that the adapter's name is set on a downstream message.
*/
@Test
public void testGetDownstreamPropertiesAddsStandardProperties() {
final TelemetryExecutionContext context = mock(TelemetryExecutionContext.class);
when(context.getDownstreamMessageProperties()).thenReturn(new HashMap<>());
final Map<String, Object> props = adapter.getDownstreamMessageProperties(context);
assertThat(props.get(MessageHelper.APP_PROPERTY_ORIG_ADAPTER)).isEqualTo(ADAPTER_NAME);
}
Aggregations