@Test
public void includesTheSecret() {

  when(secretController.getSecretById(22)).thenReturn(Optional.of(secret));
  when(aclDAO.getGroupsFor(secret)).thenReturn(Collections.emptySet());
  when(aclDAO.getClientsFor(secret)).thenReturn(Collections.emptySet());
  SecretDetailResponse response = resource.retrieveSecret(user, new LongParam("22"));
  assertThat(response.id).isEqualTo(secret.getId());
  assertThat(response.name).isEqualTo(secret.getName());
  assertThat(response.description).isEqualTo(secret.getDescription());
  assertThat(response.createdAt).isEqualTo(secret.getCreatedAt());
  assertThat(response.createdBy).isEqualTo(secret.getCreatedBy());
  assertThat(response.updatedAt).isEqualTo(secret.getUpdatedAt());
  assertThat(response.updatedBy).isEqualTo(secret.getUpdatedBy());
  assertThat(response.metadata).isEqualTo(secret.getMetadata());
}