@Test
public void deleteApplicationDeletesApplicationWhenPresent() {

    // given
    var applicationId = 1L;
    var application = new ProjectApplication(projectMock, "Comment", userMock, LocalDateTime.now(clock));
    given(applicationRepoMock.findByUserAndId(userMock, applicationId)).willReturn(Optional.of(application));
    // when
    var deletedApplication = applicationService.deleteApplication(userMock, applicationId);
    // then
    assertThat(deletedApplication).isEqualTo(application);
    verify(applicationRepoMock).delete(application);
}