### Question:
CheckApplicationQuoteScheduler implements Job { @Override public void execute(JobExecutionContext context) { if (billingDAO.isBillingQuoteReached()) { log.warn("Stopping all environments because of reaching budget quote"); environmentService.stopAll(); } }  @Override void execute(JobExecutionContext context);  }### Answer:
@Test public void testWhenQuoteNotReached() { when(billingDAO.isBillingQuoteReached()).thenReturn(false); checkApplicationQuoteScheduler.execute(jobExecutionContext); verify(billingDAO).isBillingQuoteReached(); verifyNoMoreInteractions(billingDAO); verifyZeroInteractions(environmentService); }
@Test public void testWhenQuoteReached() { when(billingDAO.isBillingQuoteReached()).thenReturn(true); checkApplicationQuoteScheduler.execute(jobExecutionContext); verify(billingDAO).isBillingQuoteReached(); verify(environmentService).stopAll(); verifyNoMoreInteractions(billingDAO, environmentService); }