@Test
public void testCreateRole() {

    String name = metadata.commit(() -> {
        SecurityRole role = createRole("feedEditor", "Editor", "Can edit feeds", FeedAccessControl.EDIT_DETAILS, FeedAccessControl.ENABLE_DISABLE, FeedAccessControl.EXPORT);
        
        assertThat(role).isNotNull().extracting("systemName", "title", "description").contains("feedEditor", "Editor", "Can edit feeds");
        assertThat(role.getAllowedActions().getAvailableActions().stream().flatMap(action -> action.stream()))
            .extracting("systemName")
            .contains(FeedAccessControl.ACCESS_DETAILS.getSystemName(), FeedAccessControl.EDIT_DETAILS.getSystemName(), FeedAccessControl.ENABLE_DISABLE.getSystemName(), FeedAccessControl.EXPORT.getSystemName());
        
        return role.getSystemName();
    }, MetadataAccess.SERVICE);
}