@Override
    public long getTotalTime() {
        return getCurrentTime() + deploymentTimeTotal;
    }
@Test
    void testGetTotalTime() {
        final ManualClock clock = new ManualClock(Duration.ofMillis(5).toNanos());

        final DeploymentStateTimeMetrics metrics =
                new DeploymentStateTimeMetrics(JobType.BATCH, settings, clock);

        final ExecutionAttemptID id1 = createExecutionAttemptId();

        metrics.onStateUpdate(id1, ExecutionState.CREATED, ExecutionState.SCHEDULED);
        metrics.onStateUpdate(id1, ExecutionState.SCHEDULED, ExecutionState.DEPLOYING);
        clock.advanceTime(Duration.ofMillis(5));
        metrics.onStateUpdate(id1, ExecutionState.DEPLOYING, ExecutionState.FINISHED);
        assertThat(metrics.getTotalTime()).isEqualTo(5L);

        final ExecutionAttemptID id2 = createExecutionAttemptId();

        metrics.onStateUpdate(id2, ExecutionState.CREATED, ExecutionState.SCHEDULED);
        metrics.onStateUpdate(id2, ExecutionState.SCHEDULED, ExecutionState.DEPLOYING);
        clock.advanceTime(Duration.ofMillis(5));
        metrics.onStateUpdate(id2, ExecutionState.DEPLOYING, ExecutionState.FINISHED);
        assertThat(metrics.getTotalTime()).isEqualTo(10L);
    }