ByteSizeValue byteSizeValue = mock(ByteSizeValue.class);
when(byteSizeValue.bytes()).thenReturn(12345342234L);
when(byteSizeValue.toString()).thenReturn("11.4gb");
OsStats.Mem mem = mock(OsStats.Mem.class);
when(osStats.mem()).thenReturn(mem);
when(mem.actualFree()).thenReturn(byteSizeValue);
when(mem.actualUsed()).thenReturn(byteSizeValue);
when(mem.usedPercent()).thenReturn((short) 22);
when(mem.freePercent()).thenReturn((short) 78);