@Test public void serializesCorrectly() throws Exception {

  SanitizedSecret sanitizedSecret = SanitizedSecret.of(
      767,
      "trapdoor",
      "v1",
      "checksum",
      ApiDate.parse("2013-03-28T21:42:42.573Z"),
      "keywhizAdmin",
      ApiDate.parse("2013-03-28T21:42:42.573Z"),
      "keywhizAdmin",
      ImmutableMap.of("owner", "the king"),
      "password",
      ImmutableMap.of("favoriteFood", "PB&J sandwich"),
      1136214245,
      1L,
      ApiDate.parse("2013-03-28T21:42:42.573Z"),
      "keywhizAdmin");
  assertThat(asJson(sanitizedSecret))
      .isEqualTo(jsonFixture("fixtures/sanitizedSecret.json"));
}