@Test
public void deleteSecret() throws Exception {

  Secret secret = new Secret(0, "mySecret", null, (Secret.LazyString) () -> "meh",
      "checksum", NOW, null, NOW, null, ImmutableMap.of(), null, null, 0, 1L, NOW, null);
  HashSet<Group> groups = new HashSet<>();
  groups.add(new Group(0, "group1", "", NOW, null, NOW, null, null));
  groups.add(new Group(0, "group2", "", NOW, null, NOW, null, null));
  when(secretController.getSecretByName(secret.getName()))
      .thenReturn(Optional.of(secret));
  when(aclDAO.getGroupsFor(secret)).thenReturn(groups);
  resource.deleteSecretSeries(automation, secret.getName());
  verify(secretDAO).deleteSecretsByName(secret.getName());
}