User { public void removeAccessInterval(AccessInterval interval) { accessIntervals.remove(interval); } User(String userId); protected  User(); void addBookmark(Project project); void removeBookmark(Project project); void addApplication(ProjectApplication application); void removeApplication(ProjectApplication application); Optional<AccessInterval> getLatestAccessInterval(); void addAccessInterval(AccessInterval interval); void removeAccessInterval(AccessInterval interval);  }
@Test public void removeAccessInterval() { User user = new User("user"); user.accessIntervals.add(accessIntervalMock); user.removeAccessInterval(accessIntervalMock); assertThat(user.accessIntervals).isEmpty(); }