DiscoveryNode node = mock(DiscoveryNode.class);
when(nodeStats.getNode()).thenReturn(node);
when(nodeStats.getOs()).thenReturn(osStats);
when(osStats.uptime()).thenReturn(new TimeValue(3600000));
OsStats.Cpu cpu = mock(OsStats.Cpu.class);
when(osStats.cpu()).thenReturn(cpu);
when(cpu.sys()).thenReturn((short) 2);
when(cpu.user()).thenReturn((short) 4);
when(cpu.idle()).thenReturn((short) 94);