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


        for (GRNType type : GRNTypes.builtinTypes()) {
            entityOwnershipService.registerNewEntity(id, mockUser, type);
            ArgumentCaptor<GrantDTO> grant = ArgumentCaptor.forClass(GrantDTO.class);
            ArgumentCaptor<User> user = ArgumentCaptor.forClass(User.class);
            grnRegistryInOrderVerification.verify(dbGrantService).create(grant.capture(), user.capture());

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