### Question:
JobExecutorMBean { @ManagedAttribute(description = "check if the job executor is activated") public boolean isJobExecutorActivated() { return jobExecutor != null && jobExecutor.isActive(); } JobExecutorMBean(ProcessEngineConfiguration processEngineConfig); @ManagedAttribute(description = "check if the job executor is activated") boolean isJobExecutorActivated(); @ManagedOperation(description = "set job executor activate") void setJobExecutorActivate(Boolean active);  }### Answer:
@Test public void TestIsJobExecutorActivatedFalse() { when(jobExecutor.isActive()).thenReturn(false); boolean result = jobExecutorMbean.isJobExecutorActivated(); verify(jobExecutor).isActive(); assertFalse(result); }
@Test public void TestIsJobExecutorActivatedTrue() { when(jobExecutor.isActive()).thenReturn(true); boolean result = jobExecutorMbean.isJobExecutorActivated(); verify(jobExecutor).isActive(); assertTrue(result); }
@Test public void TestIsJobExecutorActivatedFalse() { when(jobExecutor.isActive()).thenReturn(false); boolean result = jobExecutorMbean.isJobExecutorActivated(); verify(jobExecutor).isActive(); assertThat(result).isFalse(); }
@Test public void TestIsJobExecutorActivatedTrue() { when(jobExecutor.isActive()).thenReturn(true); boolean result = jobExecutorMbean.isJobExecutorActivated(); verify(jobExecutor).isActive(); assertThat(result).isTrue(); }