@Test public void getGroupsForSecrets() {

  aclDAO.allowAccess(jooqContext.configuration(), secret1.getId(), group2.getId());
  aclDAO.allowAccess(jooqContext.configuration(), secret1.getId(), group1.getId());
  aclDAO.allowAccess(jooqContext.configuration(), secret2.getId(), group2.getId());
  aclDAO.allowAccess(jooqContext.configuration(), secret2.getId(), group1.getId());
  Map<Long, List<Group>> groupsForSecrets =
      aclDAO.getGroupsForSecrets(ImmutableSet.of(secret1.getId(), secret2.getId()));
  assertThat(groupsForSecrets.size()).isEqualTo(2);
  assertThat(groupsForSecrets.get(secret1.getId())).containsOnly(group1, group2);
  assertThat(groupsForSecrets.get(secret2.getId())).containsOnly(group1, group2);
}