### Question:
HttpTask extends AbstractTask { protected int validResponse(String body, String statusCode){ int exitStatusCode = 0; switch (httpParameters.getHttpCheckCondition()) { case BODY_CONTAINS: if (StringUtils.isEmpty(body) || !body.contains(httpParameters.getCondition())) { appendMessage(httpParameters.getUrl() + " doesn contain " + httpParameters.getCondition()); exitStatusCode = -1; } break; case BODY_NOT_CONTAINS: if (StringUtils.isEmpty(body) || body.contains(httpParameters.getCondition())) { appendMessage(httpParameters.getUrl() + " contains " + httpParameters.getCondition()); exitStatusCode = -1; } break; case STATUS_CODE_CUSTOM: if (!statusCode.equals(httpParameters.getCondition())) { appendMessage(httpParameters.getUrl() + " statuscode: " + statusCode + ", Must be: " + httpParameters.getCondition()); exitStatusCode = -1; } break; default: if (!"200".equals(statusCode)) { appendMessage(httpParameters.getUrl() + " statuscode: " + statusCode + ", Must be: 200"); exitStatusCode = -1; } break; } return exitStatusCode; } HttpTask(TaskExecutionContext taskExecutionContext, Logger logger); @Override void init(); @Override void handle(); String getOutput(); @Override AbstractParameters getParameters();  }### Answer:
@Test public void testValidResponse(){ String body = "body"; String statusCode = "200" ; int exitStatusCode = httpTask.validResponse(body,statusCode); Assert.assertNotEquals(-1,exitStatusCode); }