@Override
public boolean isCanceled() {
return canceled;
}
};
ProcessReports report = mock(ProcessReports.class);
WorkerProcessReport workerProcessReport = mock(WorkerProcessReport.class);
WorkerProcessReport workerProcessReport2 = mock(WorkerProcessReport.class);
WorkerProcessReport[] workerProcessReports = new WorkerProcessReport[]{workerProcessReport,
workerProcessReport2};
when(workerProcessReport.getNumberOfRunningThreads()).thenReturn((short) 3);
when(workerProcessReport2.getNumberOfRunningThreads()).thenReturn((short) 2);
when(report.getWorkerProcessReports()).thenReturn(workerProcessReports);
ProcessReports[] processReports = new ProcessReports[]{report};
singleConsole.update(processReports);
assertThat(singleConsole.getRunningProcess(), is(2));
assertThat(singleConsole.getRunningThread(), is(5));