protected static List<LastOpenedDTO> filterForExistingIdAndCapAtMaximum(final LastOpenedForUserDTO loi, final GRN grn, final long max) {
        return loi.items().stream().filter(i -> !i.grn().equals(grn)).limit(max - 1).toList();
    }
@Test
    public void testRemoveIfExistsInList() {
        var _1 = grnRegistry.newGRN(GRNTypes.DASHBOARD, "1");

        LastOpenedForUserDTO dto = new LastOpenedForUserDTO("userId", List.of(new LastOpenedDTO(_1, DateTime.now(DateTimeZone.UTC))));

        var result = StartPageService.filterForExistingIdAndCapAtMaximum(dto, _1, MAX);
        assertThat(result.isEmpty()).isTrue();
    }