@Test
public void testGetGroups() {

    // Setup:
    Set<String> expectedGroups = Stream.of(groupId1, groupId2).collect(Collectors.toSet());
    Set<Group> groups = engine.getGroups();
    assertEquals(expectedGroups.size(), groups.size());
    groups.forEach(group -> assertTrue(expectedGroups.contains(group.getResource().stringValue())));
}