### Question:
RequestsDBHelper { public void updateInfraFailureCompletion(String msg, String requestId, String operationalEnvironmentId) { methodName = "updateInfraFailureCompletion() method."; classMethodMessage = className + " " + methodName; logger.debug("Begin of {}", classMethodMessage); InfraActiveRequests request = requestsDbClient.getInfraActiveRequestbyRequestId(requestId); request.setRequestStatus("FAILED"); request.setStatusMessage( "FAILURE, operationalEnvironmentId - " + operationalEnvironmentId + "; Error message: " + msg); request.setProgress(100L); request.setLastModifiedBy("APIH"); request.setOperationalEnvId(operationalEnvironmentId); if (request.getRequestScope() == null) { request.setRequestScope(UNKNOWN); } Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis()); request.setEndTime(endTimeStamp); requestsDbClient.save(request); logger.debug("End of {}", classMethodMessage); }  void updateInfraSuccessCompletion(String msg, String requestId, String operationalEnvironmentId); void updateInfraFailureCompletion(String msg, String requestId, String operationalEnvironmentId);  }### Answer:
@Test public void updateInfraFailureCompletion() { when(requestsDbClient.getInfraActiveRequestbyRequestId(any())).thenReturn(new InfraActiveRequests()); requestsDBHelper.updateInfraFailureCompletion("messageText", "requestId", "operationalEnvId"); ArgumentCaptor<InfraActiveRequests> infraActiveRequests = ArgumentCaptor.forClass(InfraActiveRequests.class); verify(requestsDbClient, times(1)).save(infraActiveRequests.capture()); assertEquals("FAILED", infraActiveRequests.getValue().getRequestStatus()); assertEquals("APIH", infraActiveRequests.getValue().getLastModifiedBy()); assertEquals(Long.valueOf(100), infraActiveRequests.getValue().getProgress()); assertEquals("FAILURE, operationalEnvironmentId - operationalEnvId; Error message: messageText", infraActiveRequests.getValue().getStatusMessage()); assertEquals("operationalEnvId", infraActiveRequests.getValue().getOperationalEnvId()); }