@Test
public void testCreateGroup() {

    Set<User> members = Stream.of(userFactory.createNew(VALUE_FACTORY.createIRI(userId))).collect(Collectors.toSet());
    Set<String> roles = Stream.of("user").collect(Collectors.toSet());
    GroupConfig config = new GroupConfig.Builder(groupName1).description("Test")
            .members(members).roles(roles).build();
    Group group = engine.createGroup(config);
    assertEquals(group.getResource().stringValue(), groupId1);
    assertEquals(group.getMember_resource().size(), members.size());
    assertEquals(group.getHasGroupRole_resource().size(), roles.size());
    assertTrue(group.getProperty(VALUE_FACTORY.createIRI(DCTERMS.TITLE.stringValue())).isPresent()
            && group.getProperty(VALUE_FACTORY.createIRI(DCTERMS.TITLE.stringValue())).get().stringValue().equals(groupName1));
    assertTrue(group.getProperty(VALUE_FACTORY.createIRI(DCTERMS.DESCRIPTION.stringValue())).isPresent()
            && group.getProperty(VALUE_FACTORY.createIRI(DCTERMS.DESCRIPTION.stringValue())).get().stringValue().equals("Test"));
}