import java.time.Duration;
+import static org.hamcrest.Matchers.endsWith;
+
public abstract class AbstractConfigurationWithShardingIT extends AbstractConfigurationIT
{
void testNotFoundForPutMessageToAChatRoomInNotOwnedShard()
{
String otherChatRoomId = "4e7246a6-29ae-43ea-b56f-669c3481ac19";
+ int shard = 0;
Awaitility
.await()
.accept(MediaType.APPLICATION_JSON)
.bodyValue("The devil rules route 66")
.exchange()
- .expectStatus().isNotFound());
+ .expectStatus().isNotFound()
+ .expectBody()
+ .jsonPath("$.type").value(endsWith("/problem/shard-not-owned"))
+ .jsonPath("$.shard").isEqualTo(shard));
}
}