@Test
void createShardNonExistentGroup() {

    // Given
    final String partitionName = "ALL";
    final DocRef index = new DocRef.Builder()
            .uuid(UUID.randomUUID().toString())
            .name(TestData.createIndexName())
            .type(IndexDoc.DOCUMENT_TYPE)
            .build();
    final Long shardFrom = System.currentTimeMillis();
    final Long shardTo = shardFrom + 3600;
    final String nodeName = TestData.createNodeName();
    final String volumeGroupName = TestData.createVolumeGroupName();
    // When
    final IndexShardKey indexShardKey = new IndexShardKey.Builder()
            .indexUuid(index.getUuid())
            .partition(partitionName)
            .shardNo(0)
            .partitionFromTime(shardFrom)
            .partitionToTime(shardTo)
            .build();
    // Then
    assertThrows(IndexException.class,
            () -> indexShardDao.create(indexShardKey, volumeGroupName, nodeName, "1.0-test"));
}