ServiceAccountKeyManager { public void tryDeleteKey(String keyName) { try { deleteKey(keyName); } catch (IOException e) { LOG.debug("Ignoring error while deleting key {}", keyName, e); } } ServiceAccountKeyManager(Iam iam); ServiceAccountKey createJsonKey(String serviceAccount); ServiceAccountKey createP12Key(String serviceAccount); boolean serviceAccountExists(String serviceAccount); boolean keyExists(String keyName); void tryDeleteKey(String keyName); void deleteKey(String keyName);  }
@Test public void tryDeleteKeyShouldIgnoreUnknownExceptions() throws Exception { when(delete.execute()).thenThrow(INTERNAL_SERVER_ERROR); sakm.tryDeleteKey("foo"); verify(iam.projects().serviceAccounts().keys()).delete("foo"); }