InstanceNode { boolean isLocalInstancePath(final String path) { return path.equals(jobNodePath.getFullPath(String.format(INSTANCES, JobRegistry.getInstance().getJobInstance(jobName).getJobInstanceId()))); } InstanceNode(final String jobName); String getInstanceFullPath(); boolean isInstancePath(final String path); static final String ROOT; }
@Test public void assertIsLocalInstancePath() { assertTrue(instanceNode.isLocalInstancePath("/test_job/instances/127.0.0.1@-@0")); }
@Test public void assertIsNotLocalInstancePath() { assertFalse(instanceNode.isLocalInstancePath("/test_job/instances/127.0.0.2@-@0")); }