@Test
public void testLinkGenerationFailure() {

    Assertions.assertThatThrownBy(() -> DocumentDownloadLinkGenerator.generateDownloadLink(null,
                                                                                           DOC_ID))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessageContaining("ServerTemplateId cannot be null");
    Assertions.assertThatThrownBy(() -> DocumentDownloadLinkGenerator.generateDownloadLink(TEMPLATE_ID,
                                                                                           null))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessageContaining("DocumentIdentifier cannot be null");
}