Skip to content

Commit

Permalink
fixed unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Jun 29, 2022
1 parent 9ea1d85 commit 22baef7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@RunWith(MockitoJUnitRunner.class)
public final class AcknowledgementAggregatorActorTest {

private static final ThingId THING_ID = ThingId.of("thing:id");
private static final ThingId THING_ID = ThingId.of("mynamespace:myname");

private static HeaderTranslator headerTranslator;

Expand Down Expand Up @@ -135,7 +135,7 @@ public void returnErrorResponseForTwin() {
// THEN
final var commandTimeoutException = testKit.expectMsgClass(CommandTimeoutException.class);
assertThat(commandTimeoutException.getDittoHeaders().get(DittoHeaderDefinition.ENTITY_ID.getKey()))
.isEqualTo(THING_ID.toString());
.isEqualTo(THING_ID.getEntityType() + ":" + THING_ID);
}

@Test
Expand All @@ -156,7 +156,7 @@ public void returnErrorResponseForLive() {
// THEN
final var commandTimeoutException = testKit.expectMsgClass(CommandTimeoutException.class);
assertThat(commandTimeoutException.getDittoHeaders().get(DittoHeaderDefinition.ENTITY_ID.getKey()))
.isEqualTo(THING_ID.toString());
.isEqualTo(THING_ID.getEntityType() + ":" + THING_ID);
}

@Test
Expand Down Expand Up @@ -369,7 +369,7 @@ public void returnSingleInvalidThingCommandResponseWithoutConnectionIdForLive()
// THEN
final var commandTimeoutException = testKit.expectMsgClass(Duration.ofSeconds(5L), CommandTimeoutException.class);
assertThat(commandTimeoutException.getDittoHeaders().get(DittoHeaderDefinition.ENTITY_ID.getKey()))
.isEqualTo(THING_ID.toString());
.isEqualTo(THING_ID.getEntityType() + ":" + THING_ID);
assertThat(commandTimeoutException.getDescription())
.hasValueSatisfying(description -> assertThat(description)
.contains(String.format(
Expand Down Expand Up @@ -403,7 +403,7 @@ public void returnSingleInvalidThingCommandResponseWithConnectionIdForLive() {
// THEN
final var commandTimeoutException = testKit.expectMsgClass(Duration.ofSeconds(5L), CommandTimeoutException.class);
assertThat(commandTimeoutException.getDittoHeaders().get(DittoHeaderDefinition.ENTITY_ID.getKey()))
.isEqualTo(THING_ID.toString());
.isEqualTo(THING_ID.getEntityType() + ":" + THING_ID);
assertThat(commandTimeoutException.getDescription())
.hasValueSatisfying(description -> assertThat(description)
.contains(String.format(
Expand Down

0 comments on commit 22baef7

Please sign in to comment.