public void registerNewEventDefinition(String id, User user) {
        final GRN grn = grnRegistry.newGRN(GRNTypes.EVENT_DEFINITION, id);
        registerNewEntity(grn, user);
    }
@Test
    void registerNewEventDefinition() {
        final User mockUser = mock(User.class);
        when(mockUser.getName()).thenReturn("mockuser");
        when(mockUser.getId()).thenReturn("mockuser");

        entityOwnershipService.registerNewEventDefinition("1234", mockUser);

        ArgumentCaptor<GrantDTO> grant = ArgumentCaptor.forClass(GrantDTO.class);
        ArgumentCaptor<User> user = ArgumentCaptor.forClass(User.class);
        verify(dbGrantService).create(grant.capture(), user.capture());

        assertThat(grant.getValue()).satisfies(g -> {
            assertThat(g.capability()).isEqualTo(Capability.OWN);
            assertThat(g.target().type()).isEqualTo(GRNTypes.EVENT_DEFINITION.type());
            assertThat(g.target().entity()).isEqualTo("1234");
            assertThat(g.grantee().type()).isEqualTo(GRNTypes.USER.type());
            assertThat(g.grantee().entity()).isEqualTo("mockuser");
        });
    }