@Test public void canDelete() {

  when(secretController.getSecretById(0xdeadbeef)).thenReturn(Optional.of(secret));
  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(aclDAO.getGroupsFor(secret)).thenReturn(groups);
  Response response = resource.deleteSecret(user, new LongParam(Long.toString(0xdeadbeef)));
  verify(secretDAO).deleteSecretsByName("name");
  assertThat(response.getStatus()).isEqualTo(204);
}