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);
Discovery discovery = mock(Discovery.class);
bind(Discovery.class).toInstance(discovery);
when(discovery.localNode()).thenReturn(node);
when(node.getId()).thenReturn("node-id-1");