InstanceService { public void removeInstance() { jobNodeStorage.removeJobNodeIfExisted(instanceNode.getLocalInstanceNode()); } InstanceService(final CoordinatorRegistryCenter regCenter, final String jobName); void persistOnline(); void removeInstance(); void clearTriggerFlag(); List<JobInstance> getAvailableJobInstances(); boolean isLocalJobInstanceExisted();  }
@Test public void assertRemoveInstance() { instanceService.removeInstance(); verify(jobNodeStorage).removeJobNodeIfExisted("instances/127.0.0.1@-@0"); }