@Test
public void serializesCorrectly() throws Exception {

  String secret = "YXNkZGFz";
  AutomationSecretResponse automationSecretResponse = AutomationSecretResponse.create(
      0,
      "Database_Password",
      secret,
      ApiDate.parse("2011-09-29T15:46:00.000Z"),
      ImmutableMap.of(),
      ImmutableList.of(),
      1136214245);
  assertThat(asJson(automationSecretResponse))
      .isEqualTo(jsonFixture("fixtures/automationSecretResponse.json"));
  AutomationSecretResponse automationSecretResponseWithMetadata = AutomationSecretResponse.create(
      66,
      "Nobody_PgPass",
      secret,
      ApiDate.parse("2011-09-29T15:46:00.000Z"),
      ImmutableMap.of("mode", "0400", "owner", "nobody"),
      ImmutableList.of(),
      1136214245);
  assertThat(asJson(automationSecretResponseWithMetadata))
      .isEqualTo(jsonFixture("fixtures/automationSecretResponseWithMetadata.json"));
}