### Question:
AcmeClientSpi { public void deactivateAccount(AcmeAccount account, boolean staging) throws AcmeException { Assert.checkNotNullParam("account", account); JsonObject payload = Json.createObjectBuilder() .add(STATUS, DEACTIVATED) .build(); sendPostRequestWithRetries(account, staging, getAccountUrl(account, staging), false, getEncodedJson(payload), HttpURLConnection.HTTP_OK); }  Map<AcmeResource, URL> getResourceUrls(AcmeAccount account, boolean staging); AcmeMetadata getMetadata(AcmeAccount account, boolean staging); boolean createAccount(AcmeAccount account, boolean staging); boolean createAccount(AcmeAccount account, boolean staging, boolean onlyReturnExisting); void updateAccount(AcmeAccount account, boolean staging, boolean termsOfServiceAgreed); void updateAccount(AcmeAccount account, boolean staging, String[] contactUrls); void updateAccount(AcmeAccount account, boolean staging, boolean termsOfServiceAgreed, String[] contactUrls); void changeAccountKey(AcmeAccount account, boolean staging); void changeAccountKey(AcmeAccount account, boolean staging, X509Certificate certificate, PrivateKey privateKey); void deactivateAccount(AcmeAccount account, boolean staging); X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String... domainNames); X509CertificateChainAndSigningKey obtainCertificateChain(AcmeAccount account, boolean staging, String keyAlgorithmName, int keySize,
                                                                    String... domainNames); String createAuthorization(AcmeAccount account, boolean staging, String domainName); void deactivateAuthorization(AcmeAccount account, boolean staging, String authorizationUrl); abstract AcmeChallenge proveIdentifierControl(AcmeAccount account, List<AcmeChallenge> challenges); abstract void cleanupAfterChallenge(AcmeAccount account, AcmeChallenge challenge); void revokeCertificate(AcmeAccount account, boolean staging, X509Certificate certificate); void revokeCertificate(AcmeAccount account, boolean staging, X509Certificate certificate, CRLReason reason); byte[] getNewNonce(final AcmeAccount account, final boolean staging); static final int DEFAULT_EC_KEY_SIZE; static final int DEFAULT_KEY_SIZE; static final String DEFAULT_KEY_ALGORITHM_NAME; }### Answer:
@Test public void testDeactivateAccount() throws Exception { final String ACCT_LOCATION = "http: server = setupTestDeactivateAccount(); AcmeAccount account = populateAccount(ACCOUNT_5_V2); account.setAccountUrl(ACCT_LOCATION); assertEquals(Acme.VALID, acmeClient.queryAccountStatus(account, false)); acmeClient.deactivateAccount(account, false); try { acmeClient.obtainCertificateChain(account, false, "172.17.0.1"); fail("Expected AcmeException not thrown"); } catch (AcmeException e) { assertTrue(e.getMessage().contains("deactivated")); } }