RestartSnapshotTaskRunner extends AbstractSnapshotTaskRunner { protected String buildBridgeURL(String snapshotId) { return MessageFormat.format("{0}/snapshot/{1}/restart", buildBridgeBaseURL(), snapshotId); } RestartSnapshotTaskRunner(String bridgeAppHost,
                                     String bridgeAppPort,
                                     String bridgeAppUser,
                                     String bridgeAppPass); @Override String getName(); @Override String performTask(String taskParameters);  }
@Test public void testBuildSnapshotURL() { replayMocks(); String snapshotUrl = taskRunner.buildBridgeURL(snapshotId); String expectedUrl = "http: "/bridge/snapshot/" + snapshotId + "/restart"; assertEquals(expectedUrl, snapshotUrl); }