@Test
public void getLatestAccessIntervalReturnsElementCollectionContainsSingleElement() {

    // given
    User user = new User("user");
    user.accessIntervals.add(accessIntervalMock);
    // when
    AccessInterval actualAccessInterval = user.getLatestAccessInterval()
            .orElseThrow(() -> new IllegalStateException("No interval instance present!"));
    // then
    assertThat(actualAccessInterval).isEqualTo(accessIntervalMock);
}