### Question:
DeployActivitySpecs { protected static String deployActivitySpec(String hostname, String activitySpecName) throws Exception { String payload = new String(Files.readAllBytes(Paths.get(ACTIVITY_FILE_LOCATION + activitySpecName))); try { HttpClient client = HttpClientBuilder.create().build(); String url = UriBuilder.fromUri(hostname).path(ACTIVITY_SPEC_URI).build().toString(); HttpPost post = new HttpPost(url); StringEntity input = new StringEntity(payload); input.setContentType(CONTENT_TYPE_JSON); post.setEntity(input); HttpResponse response = client.execute(post); StatusLine statusLine = response.getStatusLine(); if (statusLine != null) { if (statusLine.getStatusCode() != 200) { return (statusLine.toString()); } else { return null; } } else { return ("Empty response from the remote endpoint"); } } catch (Exception e) { return e.getMessage(); } }  static void main(String[] args);  }### Answer:
@Test @Ignore public void DeployActivitySpec_Test() throws Exception { String HOSTNAME = createURLWithPort(""); ProtocolVersion protocolVersion = new ProtocolVersion("", 1, 1); HttpResponse response = new BasicHttpResponse(protocolVersion, 1, ""); response.setStatusCode(404); response.setStatusLine(protocolVersion, 1, ""); HttpClient clientMock = mock(HttpClient.class); when(clientMock.execute(any(HttpPost.class))).thenReturn(response);; String result = DeployActivitySpecs.deployActivitySpec(HOSTNAME, "VNFQuiesceTrafficActivitySpec.json"); assertEquals(result, RESULT_STRING); }