ProcessStats processStats = mock(ProcessStats.class);
when(nodeStats.getProcess()).thenReturn(processStats);
when(processStats.getOpenFileDescriptors()).thenReturn(42L);
NodeInfo nodeInfo = mock(NodeInfo.class);
when(nodeService.info()).thenReturn(nodeInfo);
ProcessInfo processInfo = mock(ProcessInfo.class);
when(nodeInfo.getProcess()).thenReturn(processInfo);
when(processInfo.getMaxFileDescriptors()).thenReturn(1000L);