### Question:
DeleteCommand extends AbstractRestCommand { @Override public CallStatus run() { RequestMetrics.Context metricCtx = metrics.startCrudRequest("delete", entity, version); LOGGER.debug("run: entity={}, version={}", entity, version); Error.reset(); Error.push("rest"); Error.push(getClass().getSimpleName()); Error.push(entity); Response r = null; try { DeleteRequest ireq = getJsonTranslator().parse(DeleteRequest.class, JsonUtils.json(request)); validateReq(ireq, entity, version); addCallerId(ireq); r = getMediator().delete(ireq); return new CallStatus(r); } catch (Error e) { metricCtx.markRequestException(e); LOGGER.error("delete failure: {}", e); return new CallStatus(e); } catch (Exception e) { Error error = Error.get(RestCrudConstants.ERR_REST_DELETE, e.toString()); metricCtx.markRequestException(error); LOGGER.error("delete failure: {}", e); return new CallStatus(error); } finally { if (r != null) { metricCtx.markAllErrorsAndEndRequestMonitoring(r.getErrors()); } else { metricCtx.endRequestMonitoring(); } } } DeleteCommand(String entity, String version, String request, RequestMetrics metrics);  DeleteCommand(Mediator mediator, String entity, String version, String request, RequestMetrics metrics); @Override CallStatus run();  }### Answer:
@Test public void execute() { DeleteCommand command = new DeleteCommand(mediator, "name", "version", "{\"request\":\"data\"}", new NoopRequestMetrics()); String output = command.run().toString(); Assert.assertNotNull(output); Assert.assertEquals("delete", mediator.methodCalled); }