### Question:
CloudFoundryContainerPlatform extends CloudFoundryPlatform implements SshBasedExperiment<CloudFoundryContainer> { public void restartInstance (RestartApplicationInstanceRequest restartApplicationInstanceRequest) { log.debug("Requesting a restart of container {}", v("RestartApplicationInstanceRequest", restartApplicationInstanceRequest)); cloudFoundryOperations.applications().restartInstance(restartApplicationInstanceRequest).block(); } @Autowired  CloudFoundryContainerPlatform(); @Override boolean isContainerRecycled(Container container); ContainerHealth checkHealth(String applicationId, Integer instanceId); @Override List<Container> generateRoster(); void restartInstance(RestartApplicationInstanceRequest restartApplicationInstanceRequest); @Override String getEndpoint(CloudFoundryContainer container); @Override SSHCredentials getSshCredentials(CloudFoundryContainer container); @Override void recycleContainer(CloudFoundryContainer container);  }### Answer:
@Test @SuppressWarnings("unchecked") public void restartInstanceTest () { Mono<Void> monoVoid = mock(Mono.class); when(cloudFoundryOperations.applications()).thenReturn(applications); when(applications.restartInstance(null)).thenAnswer((Answer<Mono<Void>>) invocationOnMock -> monoVoid); cloudFoundryContainerPlatform.restartInstance(null); verify(applications, times(1)).restartInstance(null); verify(monoVoid, times(1)).block(); }