@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"); }
public boolean isDisabled(final String jobName) { return regCenter.isExisted(DisableJobNode.getDisableJobNodePath(jobName)); }
DisableJobService { public boolean isDisabled(final String jobName) { return regCenter.isExisted(DisableJobNode.getDisableJobNodePath(jobName)); } }
DisableJobService { public boolean isDisabled(final String jobName) { return regCenter.isExisted(DisableJobNode.getDisableJobNodePath(jobName)); } DisableJobService(final CoordinatorRegistryCenter regCenter); }
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); }
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);  }