api/src/test/java/com/epam/pipeline/manager/cluster/performancemonitoring/ResourceMonitoringManagerTest.java
private LocalDateTime mockAlreadyNotifiedRuns() {
        LocalDateTime now = DateUtils.nowUTC();
        LocalDateTime nowMinus1 = now.minusMinutes(1);
        idleOnDemandRun.setLastIdleNotificationTime(nowMinus1);
        idleSpotRun.setLastIdleNotificationTime(nowMinus1);

        when(pipelineRunManager.loadRunningPipelineRuns()).thenReturn(
                Arrays.asList(okayRun, idleOnDemandRun, idleSpotRun));
        return nowMinus1;
    }
/**
     * Mock runs, that already has been notified on idle. Now we need to take some action on them
     * @return last notification date
     */
Mock runs, that already has been notified on idle. Now we need to take some action on them
@return last notification date
Mock runs that already has been notified on idle . Now we need to take some action on them @return last notification date
private LocalDateTime mockAlreadyNotifiedRuns() {
        LocalDateTime now = DateUtils.nowUTC();
        LocalDateTime nowMinus1 = now.minusMinutes(1);
        idleOnDemandRun.setLastIdleNotificationTime(nowMinus1);
        idleSpotRun.setLastIdleNotificationTime(nowMinus1);
        when(pipelineRunManager.loadRunningPipelineRuns()).thenReturn(
                Arrays.asList(okayRun, idleOnDemandRun, idleSpotRun));
        return nowMinus1;
    }
private LocalDateTime mockAlreadyNotifiedRuns ( ) { LocalDateTime now = DateUtils . nowUTC ( ) ; LocalDateTime nowMinus1 = now . minusMinutes ( 1 ) ; idleOnDemandRun . setLastIdleNotificationTime ( nowMinus1 ) ; idleSpotRun . setLastIdleNotificationTime ( nowMinus1 ) ; when ( pipelineRunManager . loadRunningPipelineRuns ( ) ) . thenReturn ( Arrays . asList ( okayRun , idleOnDemandRun , idleSpotRun ) ) ; return nowMinus1 ; }
Mock runs, that already has been notified on idle.
Mock runs that already has been notified on idle .