### Question:
CommandStatusReportHandler implements
    EventHandler<CommandStatusReportFromDatanode> { @Override public void onMessage(CommandStatusReportFromDatanode report, EventPublisher publisher) { Preconditions.checkNotNull(report); List<CommandStatus> cmdStatusList = report.getReport().getCmdStatusList(); Preconditions.checkNotNull(cmdStatusList); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Processing command status report for dn: {}", report .getDatanodeDetails()); } cmdStatusList.forEach(cmdStatus -> { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Emitting command status for id:{} type: {}", cmdStatus .getCmdId(), cmdStatus.getType()); } if (cmdStatus.getType() == SCMCommandProto.Type.deleteBlocksCommand) { if (cmdStatus.getStatus() == CommandStatus.Status.EXECUTED) { publisher.fireEvent(SCMEvents.DELETE_BLOCK_STATUS, new DeleteBlockStatus(cmdStatus)); } } else { LOGGER.debug("CommandStatus of type:{} not handled in " + "CommandStatusReportHandler.", cmdStatus.getType()); } }); }  @Override void onMessage(CommandStatusReportFromDatanode report,
      EventPublisher publisher);  }### Answer:
@Test public void testCommandStatusReport() { GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer .captureLogs(LOG); CommandStatusReportFromDatanode report = this.getStatusReport(Collections .emptyList()); cmdStatusReportHandler.onMessage(report, this); assertFalse(logCapturer.getOutput().contains("Delete_Block_Status")); assertFalse(logCapturer.getOutput().contains("Replicate_Command_Status")); report = this.getStatusReport(this.getCommandStatusList()); cmdStatusReportHandler.onMessage(report, this); assertTrue(logCapturer.getOutput().contains("firing event of type " + "Delete_Block_Status")); assertTrue(logCapturer.getOutput().contains("type: " + "deleteBlocksCommand")); }