Search in sources :

Example 81 with Span

use of io.opentracing.Span in project hono by eclipse.

the class CacheBasedDeviceConnectionInfoTest method testGetCommandHandlingAdapterInstancesWithSuspectedAdapterInstance.

/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation fails
 * if the adapter instance mapping entry is associated with a adapter having the state 'SUSPECTED_DEAD'.
 *
 * @param ctx The vert.x context.
 */
@Test
public void testGetCommandHandlingAdapterInstancesWithSuspectedAdapterInstance(final VertxTestContext ctx) {
    final AdapterInstanceStatusProvider statusProvider = mock(AdapterInstanceStatusProvider.class);
    info = new CacheBasedDeviceConnectionInfo(cache, tracer, statusProvider);
    final String deviceId = "testDevice";
    final String adapterInstance = "adapterInstance";
    when(cache.get(anyString())).thenReturn(Future.succeededFuture(adapterInstance));
    when(statusProvider.getStatus(adapterInstance)).thenReturn(AdapterInstanceStatus.SUSPECTED_DEAD);
    when(cache.remove(anyString(), anyString())).thenReturn(Future.succeededFuture(Boolean.TRUE));
    info.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, deviceId, Set.of(), span).onComplete(ctx.failing(t -> {
        ctx.verify(() -> {
            verify(cache).get(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, deviceId));
            assertThat(t).isInstanceOf(ClientErrorException.class);
            assertThat(((ClientErrorException) t).getErrorCode()).isEqualTo(HttpURLConnection.HTTP_NOT_FOUND);
            // verify mapping entry for terminated adapter instance has not been removed
            verify(cache, never()).remove(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, deviceId), adapterInstance);
        });
        ctx.completeNow();
    }));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ArgumentMatchers.anyMap(org.mockito.ArgumentMatchers.anyMap) AdapterInstanceStatus(org.eclipse.hono.util.AdapterInstanceStatus) ClientErrorException(org.eclipse.hono.client.ClientErrorException) Constants(org.eclipse.hono.util.Constants) Timeout(io.vertx.junit5.Timeout) HashSet(java.util.HashSet) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Duration(java.time.Duration) Map(java.util.Map) TracingMockSupport(org.eclipse.hono.test.TracingMockSupport) JsonObject(io.vertx.core.json.JsonObject) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) Tracer(io.opentracing.Tracer) DeviceConnectionConstants(org.eclipse.hono.util.DeviceConnectionConstants) Set(java.util.Set) ServerErrorException(org.eclipse.hono.client.ServerErrorException) IOException(java.io.IOException) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) JsonArray(io.vertx.core.json.JsonArray) Mockito.never(org.mockito.Mockito.never) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Span(io.opentracing.Span) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) ClientErrorException(org.eclipse.hono.client.ClientErrorException) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 82 with Span

use of io.opentracing.Span in project hono by eclipse.

the class CacheBasedDeviceConnectionInfoTest method testGetCommandHandlingAdapterInstancesWithTerminatedAdapterInstance.

/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation fails
 * if the adapter instance mapping entry is associated with a terminated adapter.
 *
 * @param ctx The vert.x context.
 */
@Test
public void testGetCommandHandlingAdapterInstancesWithTerminatedAdapterInstance(final VertxTestContext ctx) {
    final AdapterInstanceStatusProvider statusProvider = mock(AdapterInstanceStatusProvider.class);
    info = new CacheBasedDeviceConnectionInfo(cache, tracer, statusProvider);
    final String deviceId = "testDevice";
    final String adapterInstance = "adapterInstance";
    when(cache.get(anyString())).thenReturn(Future.succeededFuture(adapterInstance));
    when(statusProvider.getStatus(adapterInstance)).thenReturn(AdapterInstanceStatus.DEAD);
    when(cache.remove(anyString(), anyString())).thenReturn(Future.succeededFuture(Boolean.TRUE));
    info.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, deviceId, Set.of(), span).onComplete(ctx.failing(t -> {
        ctx.verify(() -> {
            verify(cache).get(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, deviceId));
            assertThat(t).isInstanceOf(ClientErrorException.class);
            assertThat(((ClientErrorException) t).getErrorCode()).isEqualTo(HttpURLConnection.HTTP_NOT_FOUND);
            // verify mapping entry for terminated adapter instance has been removed
            verify(cache).remove(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, deviceId), adapterInstance);
        });
        ctx.completeNow();
    }));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ArgumentMatchers.anyMap(org.mockito.ArgumentMatchers.anyMap) AdapterInstanceStatus(org.eclipse.hono.util.AdapterInstanceStatus) ClientErrorException(org.eclipse.hono.client.ClientErrorException) Constants(org.eclipse.hono.util.Constants) Timeout(io.vertx.junit5.Timeout) HashSet(java.util.HashSet) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Duration(java.time.Duration) Map(java.util.Map) TracingMockSupport(org.eclipse.hono.test.TracingMockSupport) JsonObject(io.vertx.core.json.JsonObject) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) Tracer(io.opentracing.Tracer) DeviceConnectionConstants(org.eclipse.hono.util.DeviceConnectionConstants) Set(java.util.Set) ServerErrorException(org.eclipse.hono.client.ServerErrorException) IOException(java.io.IOException) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) JsonArray(io.vertx.core.json.JsonArray) Mockito.never(org.mockito.Mockito.never) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Span(io.opentracing.Span) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) ClientErrorException(org.eclipse.hono.client.ClientErrorException) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 83 with Span

use of io.opentracing.Span in project hono by eclipse.

the class CacheBasedDeviceConnectionInfoTest method testGetCommandHandlingAdapterInstancesForDevice.

/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation succeeds if an adapter instance had
 * been registered for the given device.
 *
 * @param ctx The vert.x context.
 */
@Test
public void testGetCommandHandlingAdapterInstancesForDevice(final VertxTestContext ctx) {
    final var entry = new JsonObject().put(DeviceConnectionConstants.FIELD_PAYLOAD_DEVICE_ID, "testDevice").put(DeviceConnectionConstants.FIELD_ADAPTER_INSTANCE_ID, "adapterInstance");
    final var value = new JsonObject().put(DeviceConnectionConstants.FIELD_ADAPTER_INSTANCES, new JsonArray().add(entry));
    when(cache.get(anyString())).thenReturn(Future.succeededFuture("adapterInstance"));
    info.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, "testDevice", Set.of(), span).onComplete(ctx.succeeding(result -> {
        ctx.verify(() -> {
            verify(cache).get(eq(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, "testDevice")));
            assertThat(result).isEqualTo(value);
        });
        ctx.completeNow();
    }));
}
Also used : JsonArray(io.vertx.core.json.JsonArray) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ArgumentMatchers.anyMap(org.mockito.ArgumentMatchers.anyMap) AdapterInstanceStatus(org.eclipse.hono.util.AdapterInstanceStatus) ClientErrorException(org.eclipse.hono.client.ClientErrorException) Constants(org.eclipse.hono.util.Constants) Timeout(io.vertx.junit5.Timeout) HashSet(java.util.HashSet) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Duration(java.time.Duration) Map(java.util.Map) TracingMockSupport(org.eclipse.hono.test.TracingMockSupport) JsonObject(io.vertx.core.json.JsonObject) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) Tracer(io.opentracing.Tracer) DeviceConnectionConstants(org.eclipse.hono.util.DeviceConnectionConstants) Set(java.util.Set) ServerErrorException(org.eclipse.hono.client.ServerErrorException) IOException(java.io.IOException) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) JsonArray(io.vertx.core.json.JsonArray) Mockito.never(org.mockito.Mockito.never) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Span(io.opentracing.Span) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) JsonObject(io.vertx.core.json.JsonObject) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 84 with Span

use of io.opentracing.Span in project hono by eclipse.

the class CacheBasedDeviceConnectionInfoTest method testGetCommandHandlingAdapterInstancesWithoutLastKnownGatewayIsGivingDevicePrecedence.

/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation succeeds with a result containing just
 * the mapping of *the given device* to its command handling adapter instance, even though an adapter instance is
 * also registered for the other gateway given in the viaGateway.
 *
 * @param extraUnusedViaGateways Test values.
 * @param ctx The vert.x context.
 */
@ParameterizedTest(name = PARAMETERIZED_TEST_NAME_PATTERN)
@MethodSource("extraUnusedViaGateways")
public void testGetCommandHandlingAdapterInstancesWithoutLastKnownGatewayIsGivingDevicePrecedence(final Set<String> extraUnusedViaGateways, final VertxTestContext ctx) {
    final String deviceId = "testDevice";
    final String adapterInstance = "adapterInstance";
    final String otherAdapterInstance = "otherAdapterInstance";
    final String gatewayId = "gw-1";
    final Set<String> viaGateways = new HashSet<>(Set.of(gatewayId));
    viaGateways.addAll(extraUnusedViaGateways);
    // GIVEN testDevice has no last known gateway registered
    when(cache.get(CacheBasedDeviceConnectionInfo.getGatewayEntryKey(Constants.DEFAULT_TENANT, deviceId))).thenReturn(Future.succeededFuture());
    // and testDevice's and gw-1's command handling adapter instances are set to
    // adapterInstance and otherAdapterInstance respectively
    when(cache.getAll(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKeys(Constants.DEFAULT_TENANT, deviceId, viaGateways))).thenReturn(Future.succeededFuture(Map.of(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, deviceId), adapterInstance, CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, gatewayId), otherAdapterInstance)));
    info.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, deviceId, viaGateways, span).onComplete(ctx.succeeding(result -> {
        ctx.verify(() -> {
            assertNotNull(result);
            assertGetInstancesResultMapping(result, deviceId, adapterInstance);
            // be sure that only the mapping for the device is returned, not the mappings for the gateway
            assertGetInstancesResultSize(result, 1);
        });
        ctx.completeNow();
    }));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ArgumentMatchers.anyMap(org.mockito.ArgumentMatchers.anyMap) AdapterInstanceStatus(org.eclipse.hono.util.AdapterInstanceStatus) ClientErrorException(org.eclipse.hono.client.ClientErrorException) Constants(org.eclipse.hono.util.Constants) Timeout(io.vertx.junit5.Timeout) HashSet(java.util.HashSet) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Duration(java.time.Duration) Map(java.util.Map) TracingMockSupport(org.eclipse.hono.test.TracingMockSupport) JsonObject(io.vertx.core.json.JsonObject) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) Tracer(io.opentracing.Tracer) DeviceConnectionConstants(org.eclipse.hono.util.DeviceConnectionConstants) Set(java.util.Set) ServerErrorException(org.eclipse.hono.client.ServerErrorException) IOException(java.io.IOException) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) JsonArray(io.vertx.core.json.JsonArray) Mockito.never(org.mockito.Mockito.never) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Span(io.opentracing.Span) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) HashSet(java.util.HashSet) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 85 with Span

use of io.opentracing.Span in project hono by eclipse.

the class CacheBasedDeviceConnectionInfoTest method testGetCommandHandlingAdapterInstancesForMultipleSubscribedVias.

/**
 * Verifies that the <em>getCommandHandlingAdapterInstances</em> operation succeeds with a result containing
 * the mappings of gateways, even though there is no last known gateway set for the device.
 *
 * @param extraUnusedViaGateways Test values.
 * @param ctx The vert.x context.
 */
@ParameterizedTest(name = PARAMETERIZED_TEST_NAME_PATTERN)
@MethodSource("extraUnusedViaGateways")
public void testGetCommandHandlingAdapterInstancesForMultipleSubscribedVias(final Set<String> extraUnusedViaGateways, final VertxTestContext ctx) {
    final String deviceId = "testDevice";
    final String adapterInstance = "adapterInstance";
    final String otherAdapterInstance = "otherAdapterInstance";
    final String gatewayId = "gw-1";
    final String otherGatewayId = "gw-2";
    final Set<String> viaGateways = new HashSet<>(Set.of(gatewayId, otherGatewayId));
    viaGateways.addAll(extraUnusedViaGateways);
    // GIVEN testDevice has no last known gateway registered
    when(cache.get(CacheBasedDeviceConnectionInfo.getGatewayEntryKey(Constants.DEFAULT_TENANT, deviceId))).thenReturn(Future.succeededFuture());
    // and gw-1's and gw-2's command handling adapter instance are set to
    // adapterInstance and otherAdapterInstance respectively
    when(cache.getAll(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKeys(Constants.DEFAULT_TENANT, deviceId, viaGateways))).thenReturn(Future.succeededFuture(Map.of(CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, gatewayId), adapterInstance, CacheBasedDeviceConnectionInfo.getAdapterInstanceEntryKey(Constants.DEFAULT_TENANT, otherGatewayId), otherAdapterInstance)));
    info.getCommandHandlingAdapterInstances(Constants.DEFAULT_TENANT, deviceId, viaGateways, span).onComplete(ctx.succeeding(result -> {
        ctx.verify(() -> {
            assertNotNull(result);
            assertGetInstancesResultMapping(result, gatewayId, adapterInstance);
            assertGetInstancesResultMapping(result, otherGatewayId, otherAdapterInstance);
            assertGetInstancesResultSize(result, 2);
        });
        ctx.completeNow();
    }));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HttpURLConnection(java.net.HttpURLConnection) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) BeforeEach(org.junit.jupiter.api.BeforeEach) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ArgumentMatchers.anyMap(org.mockito.ArgumentMatchers.anyMap) AdapterInstanceStatus(org.eclipse.hono.util.AdapterInstanceStatus) ClientErrorException(org.eclipse.hono.client.ClientErrorException) Constants(org.eclipse.hono.util.Constants) Timeout(io.vertx.junit5.Timeout) HashSet(java.util.HashSet) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Duration(java.time.Duration) Map(java.util.Map) TracingMockSupport(org.eclipse.hono.test.TracingMockSupport) JsonObject(io.vertx.core.json.JsonObject) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) Tracer(io.opentracing.Tracer) DeviceConnectionConstants(org.eclipse.hono.util.DeviceConnectionConstants) Set(java.util.Set) ServerErrorException(org.eclipse.hono.client.ServerErrorException) IOException(java.io.IOException) Mockito.when(org.mockito.Mockito.when) Truth.assertThat(com.google.common.truth.Truth.assertThat) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Test(org.junit.jupiter.api.Test) JsonArray(io.vertx.core.json.JsonArray) Mockito.never(org.mockito.Mockito.never) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Span(io.opentracing.Span) Collections(java.util.Collections) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) HashSet(java.util.HashSet) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

Span (io.opentracing.Span)370 Future (io.vertx.core.Future)182 HttpURLConnection (java.net.HttpURLConnection)174 Tracer (io.opentracing.Tracer)123 JsonObject (io.vertx.core.json.JsonObject)119 ClientErrorException (org.eclipse.hono.client.ClientErrorException)117 Map (java.util.Map)116 SpanContext (io.opentracing.SpanContext)115 Objects (java.util.Objects)109 List (java.util.List)104 TracingHelper (org.eclipse.hono.tracing.TracingHelper)104 Optional (java.util.Optional)102 Promise (io.vertx.core.Promise)98 Test (org.junit.jupiter.api.Test)96 MessageHelper (org.eclipse.hono.util.MessageHelper)89 Vertx (io.vertx.core.Vertx)84 Constants (org.eclipse.hono.util.Constants)82 ServerErrorException (org.eclipse.hono.client.ServerErrorException)80 Truth.assertThat (com.google.common.truth.Truth.assertThat)79 Mockito.mock (org.mockito.Mockito.mock)79