@Test
public void updateCallsUpdateForSecret() throws Exception {

  updateActionConfig.name = secret.getDisplayName();
  updateActionConfig.expiry = "2006-01-02T15:04:05Z";
  updateActionConfig.contentProvided = true;
  byte[] content = base64Decoder.decode(secret.getSecret());
  updateAction.stream = new ByteArrayInputStream(content);
  when(keywhizClient.getSanitizedSecretByName(secret.getName()))
      .thenThrow(new NotFoundException()); // Call checks for existence.
  when(keywhizClient.updateSecret(secret.getName(), false, "", true, content, false,
      updateActionConfig.getMetadata(Jackson.newObjectMapper()), true, 1136214245))
      .thenReturn(secretDetailResponse);
  updateAction.run();
  verify(keywhizClient, times(1)).updateSecret(secret.getName(), false, "", true, content, false,
      updateActionConfig.getMetadata(Jackson.newObjectMapper()), true, 1136214245);
}