@Test
public void testWorkerMonitors() {

    when(workerManager.getWorkerUuid()).thenReturn("1");
    when(workerManager.getExecutionThreadsCount()).thenReturn(5);
    when(inBuffer.getCapacity()).thenReturn(55);
    when(outBuffer.getCapacity()).thenReturn(66);
    Map<WorkerMonitorInfoEnum, Serializable> monitorInfo = workerMonitors.getMonitorInfo();
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.TOTAL_MEMORY));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.FREE_MEMORY));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.MAX_MEMORY));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.WORKER_ID));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.EXECUTION_THREADS_AMOUNT));
    assertEquals(5, monitorInfo.get(WorkerMonitorInfoEnum.EXECUTION_THREADS_AMOUNT));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.OUTBUFFER_CAPACITY));
    assertEquals(66, monitorInfo.get(WorkerMonitorInfoEnum.OUTBUFFER_CAPACITY));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.INBUFFER_CAPACITY));
    assertEquals(55, monitorInfo.get(WorkerMonitorInfoEnum.INBUFFER_CAPACITY));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_START_TIME));
    assertNotNull(monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_END_TIME));
    Long firstStart = (Long) monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_START_TIME);
    Long firstEnd = (Long) monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_END_TIME);
    try {
        Thread.sleep(50);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    monitorInfo = workerMonitors.getMonitorInfo();
    Long secondStart = (Long) monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_START_TIME);
    Long secondEnd = (Long) monitorInfo.get(WorkerMonitorInfoEnum.MONITOR_END_TIME);
    assertFalse(firstStart.equals(secondStart));
    assertFalse(firstEnd.equals(secondEnd));
}