@Test
public void tryToCreateThingWithDifferentThingId() {

    final ThingId thingIdOfActor = ThingId.of("test.ns", "23420815");
    final Thing thing = createThingV2WithRandomId();
    final CreateThing createThing = CreateThing.of(thing, null, dittoHeadersV2);
    final Props props = ThingPersistenceActor.props(thingIdOfActor, getDistributedPub());
    final TestActorRef<ThingPersistenceActor> underTest = TestActorRef.create(actorSystem, props);
    final ThingPersistenceActor thingPersistenceActor = underTest.underlyingActor();
    final PartialFunction<Object, BoxedUnit> receiveCommand = thingPersistenceActor.receiveCommand();
    try {
        receiveCommand.apply(createThing);
        fail("Expected IllegalArgumentException to be thrown.");
    } catch (final Exception e) {
        assertThat(e).isInstanceOf(IllegalArgumentException.class);
    }
}