### Question:
DisableJobService { public boolean isDisabled(final String jobName) { return regCenter.isExisted(DisableJobNode.getDisableJobNodePath(jobName)); } DisableJobService(final CoordinatorRegistryCenter regCenter); void add(final String jobName); void remove(final String jobName); boolean isDisabled(final String jobName);  }### Answer:
@Test public void assertIsDisabled() { Mockito.when(regCenter.isExisted("/state/disable/job/test_job")).thenReturn(true); Assert.assertTrue(disableJobService.isDisabled("test_job")); Mockito.verify(regCenter).isExisted("/state/disable/job/test_job"); }
@Test public void assertIsEnabled() { Mockito.when(regCenter.isExisted("/state/disable/job/test_job")).thenReturn(false); Assert.assertFalse(disableJobService.isDisabled("test_job")); Mockito.verify(regCenter).isExisted("/state/disable/job/test_job"); }
@Test public void assertIsDisabled() { when(regCenter.isExisted("/state/disable/job/test_job")).thenReturn(true); assertTrue(disableJobService.isDisabled("test_job")); verify(regCenter).isExisted("/state/disable/job/test_job"); }
@Test public void assertIsEnabled() { when(regCenter.isExisted("/state/disable/job/test_job")).thenReturn(false); assertFalse(disableJobService.isDisabled("test_job")); verify(regCenter).isExisted("/state/disable/job/test_job"); }