AbortBackupRequest extends CliLegacyMessage { @Override protected AdminResponse createResponse(DistributionManager dm) { abortBackupFactory.createAbortBackup(dm.getCache()).run(); return abortBackupFactory.createBackupResponse(getSender(), new HashSet<>()); } AbortBackupRequest();   AbortBackupRequest(InternalDistributedMember sender, Set<InternalDistributedMember> recipients,
      int processorId, AbortBackupFactory abortBackupFactory); @Override int getDSFID();  }
@Test public void usesFactoryToCreateAbortBackupAndResponse() { assertThat(abortBackupRequest.createResponse(dm)).isInstanceOf(BackupResponse.class); verify(abortBackupFactory, times(1)).createAbortBackup(eq(cache)); verify(abortBackupFactory, times(1)).createBackupResponse(eq(sender), eq(new HashSet<>())); }