@Test
public void removeAccessFromUserNoActiveAccessIntervalPresent() {

    // given
    var inactiveStartTime = LocalDateTime.now(clock).minus(10L, ChronoUnit.DAYS);
    var inactiveEndTime = LocalDateTime.now(clock).minus(1L, ChronoUnit.DAYS);
    given(userMock.getLatestAccessInterval()).willReturn(Optional.of(accessIntervalMock));
    given(accessIntervalMock.getStartTime()).willReturn(inactiveStartTime);
    given(accessIntervalMock.getEndTime()).willReturn(inactiveEndTime);
    // when
    var actualUser = accessService.removeAccessFromUser(userMock);
    // then
    assertThat(actualUser).isEqualTo(userMock);
    verify(accessIntervalMock, never()).setEndTime(any());
    verify(userAccessEventHandlerMock, never()).onAccessCreated(any(), any());
}