@Test public void createSecret() {

  int secretsBefore = tableSize(SECRETS);
  int secretContentsBefore = tableSize(SECRETS_CONTENT);
  String name = "newSecret";
  String content = "c2VjcmV0MQ==";
  String hmac = cryptographer.computeHmac(content.getBytes(UTF_8), "hmackey");
  String encryptedContent = cryptographer.encryptionKeyDerivedFrom(name).encrypt(content);
  long newId = secretDAO.createSecret(name, encryptedContent, hmac, "creator",
      ImmutableMap.of(), 0, "", null, ImmutableMap.of());
  SecretSeriesAndContent newSecret = secretDAO.getSecretById(newId).get();
  assertThat(tableSize(SECRETS)).isEqualTo(secretsBefore + 1);
  assertThat(tableSize(SECRETS_CONTENT)).isEqualTo(secretContentsBefore + 1);
  newSecret = secretDAO.getSecretByName(newSecret.series().name()).get();
  assertThat(secretDAO.getSecrets(null, null, null,null, null)).containsOnly(secret1, secret2b, newSecret);
}