FlushToDiskRequest extends CliLegacyMessage { @Override protected AdminResponse createResponse(DistributionManager dm) { flushToDiskFactory.createFlushToDisk(dm.getCache()).run(); return flushToDiskFactory.createResponse(getSender()); } FlushToDiskRequest();   FlushToDiskRequest(InternalDistributedMember sender, Set<InternalDistributedMember> recipients,
      int processorId, FlushToDiskFactory flushToDiskFactory); @Override int getDSFID();  }
@Test public void usesFactoryToCreateFlushToDisk() throws Exception { flushToDiskRequest.createResponse(dm); verify(flushToDiskFactory, times(1)).createFlushToDisk(eq(cache)); }
@Test public void usesFactoryToCreateResponse() throws Exception { flushToDiskRequest.createResponse(dm); verify(flushToDiskFactory, times(1)).createResponse(eq(sender)); }
@Test public void returnsFlushToDiskResponse() throws Exception { assertThat(flushToDiskRequest.createResponse(dm)).isInstanceOf(FlushToDiskResponse.class); }