ServerNode { public boolean isServerStatusPath(final String path) { return path.startsWith(jobNodePath.getFullPath(ServerNode.ROOT)) && path.endsWith(ServerNode.STATUS_APPENDIX); } ServerNode(final String jobName); boolean isLocalJobTriggerPath(final String path); boolean isLocalJobPausedPath(final String path); boolean isLocalJobShutdownPath(final String path); boolean isLocalServerDisabledPath(final String path); boolean isServerStatusPath(final String path); boolean isServerDisabledPath(final String path); boolean isServerShutdownPath(final String path); static final String ROOT; }
@Test public void assertIsServerStatusPath() { assertTrue(serverNode.isServerStatusPath("/testJob/servers/host0/status")); assertFalse(serverNode.isServerStatusPath("/otherJob/servers/host0/status")); assertFalse(serverNode.isServerStatusPath("/testJob/servers/host0/disabled")); }