@Test void testStopAttachedFreeipaInstancesWhenFreeipaAvailable() { DescribeFreeIpaResponse freeipaResponse = new DescribeFreeIpaResponse(); freeipaResponse.setStatus(Status.AVAILABLE); when(freeIpaService.describe(ENV_CRN)).thenReturn(Optional.of(freeipaResponse)); when(freeipaPollerProvider.stopPoller(ENV_ID, ENV_CRN)).thenReturn(AttemptResults::justFinish); underTest.stopAttachedFreeipaInstances(ENV_ID, ENV_CRN); verify(freeIpaService, times(1)).stopFreeIpa(ENV_CRN); }
public void stopAttachedFreeipaInstances(Long envId, String envCrn) { executeFreeIpaOperationAndStartPolling(envCrn, freeIpaService::stopFreeIpa, freeipaPollerProvider.stopPoller(envId, envCrn), Status::isStoppable); }
FreeIpaPollerService { public void stopAttachedFreeipaInstances(Long envId, String envCrn) { executeFreeIpaOperationAndStartPolling(envCrn, freeIpaService::stopFreeIpa, freeipaPollerProvider.stopPoller(envId, envCrn), Status::isStoppable); } }
FreeIpaPollerService { public void stopAttachedFreeipaInstances(Long envId, String envCrn) { executeFreeIpaOperationAndStartPolling(envCrn, freeIpaService::stopFreeIpa, freeipaPollerProvider.stopPoller(envId, envCrn), Status::isStoppable); } FreeIpaPollerService(FreeIpaService freeIpaService, FreeIpaPollerProvider freeipaPollerProvider); }
FreeIpaPollerService { public void stopAttachedFreeipaInstances(Long envId, String envCrn) { executeFreeIpaOperationAndStartPolling(envCrn, freeIpaService::stopFreeIpa, freeipaPollerProvider.stopPoller(envId, envCrn), Status::isStoppable); } FreeIpaPollerService(FreeIpaService freeIpaService, FreeIpaPollerProvider freeipaPollerProvider); void startAttachedFreeipaInstances(Long envId, String envCrn); void stopAttachedFreeipaInstances(Long envId, String envCrn); void waitForSynchronizeUsers(Long envId, String envCrn); }
FreeIpaPollerService { public void stopAttachedFreeipaInstances(Long envId, String envCrn) { executeFreeIpaOperationAndStartPolling(envCrn, freeIpaService::stopFreeIpa, freeipaPollerProvider.stopPoller(envId, envCrn), Status::isStoppable); } FreeIpaPollerService(FreeIpaService freeIpaService, FreeIpaPollerProvider freeipaPollerProvider); void startAttachedFreeipaInstances(Long envId, String envCrn); void stopAttachedFreeipaInstances(Long envId, String envCrn); void waitForSynchronizeUsers(Long envId, String envCrn);  }