### Question:
EncryptionKeyService extends EscrowAgentService { @Override public TreeMap<String, String> getParameters() { TreeMap<String, String> parameters = new TreeMap<>(); parameters.put("client_id", clientCredentials.getClientId()); parameters.put("timestamp", String.valueOf(getTimeStamp())); parameters.put("nonce", getNonce()); parameters.put("request_token", requestToken.getRequestToken()); return parameters; } EncryptionKeyService(final ClientCredentials clientCredentials,
            final EscrowAgent escrowAgent, final SecureConnection con,
            final RequestToken requestToken); @Override TreeMap<String, String> getParameters(); EncryptionKey requestEncryptionKey();  }### Answer:
@Test public void testGetParameters() throws IOException { EncryptionKeyService service = new EncryptionKeyService(client, escrowAgent, secure, requestToken); TreeMap<String, String> parameters = service.getParameters(); Assert.assertEquals(parameters.get("client_id"), client.getClientId()); Assert.assertEquals(parameters.get("request_token"), requestToken.getRequestToken()); Assert.assertEquals(parameters.size(), 4); Assert.assertNotNull(parameters.get("timestamp")); Assert.assertNotNull(parameters.get("nonce")); }
@Test public void testSignRequest() throws UnsupportedEncodingException { EncryptionKeyService service = new EncryptionKeyService(client, escrowAgent, secure, requestToken); SignatureBase signatureBase = new SignatureBase(service.getParameters(), "url", "POST"); Assert.assertNotNull(service.signRequest(signatureBase, "key")); }