### Question:
CloudFoundryApplicationPlatform extends CloudFoundryPlatform { public void rescaleApplication (String applicationName, int instances) { ScaleApplicationRequest scaleApplicationRequest = ScaleApplicationRequest.builder() .name(applicationName) .instances(instances) .build(); cloudFoundryOperations.applications().scale(scaleApplicationRequest).block(); } @Autowired  CloudFoundryApplicationPlatform(); ContainerHealth checkPlatformHealth(); @Override List<Container> generateRoster(); @Override boolean isContainerRecycled(Container container); void rescaleApplication(String applicationName, int instances); void restartApplication(String applicationName); void unmapRoute(UnmapRouteRequest unmapRouteRequest); void mapRoute(MapRouteRequest mapRouteRequest);  }### Answer:
@Test public void rescaleApplication () { ScaleApplicationRequest scaleApplicationRequest = ScaleApplicationRequest.builder() .name(APPLICATION_NAME) .instances(INSTANCES) .build(); Mono monoVoid = mock(Mono.class); doReturn(applications).when(cloudFoundryOperations).applications(); doReturn(monoVoid).when(applications).scale(scaleApplicationRequest); cloudFoundryApplicationPlatform.rescaleApplication(APPLICATION_NAME, INSTANCES); verify(applications, times(1)).scale(scaleApplicationRequest); verify(monoVoid, times(1)).block(); }