### Question:
JmxRuntimeFactory { public @Nonnull JmxRuntime forLocalProcess(int pid) throws FailedToInitializeJmxConnection { return fromConnection(new LocalConnector(pid).getServerConnection()); }  @Nonnull JmxRuntime forConnectionString(@Nonnull String locator); @Nonnull JmxRuntime forRemoteProcess(@Nonnull String host, int port); @Nonnull JmxRuntime forRemoteProcess(@Nonnull String host, int port, String username, String password); @Nonnull JmxRuntime forLocalProcess(int pid);  }### Answer:
@Test(expected = JmxRuntimeFactory.FailedToInitializeJmxConnection.class) public void connectToNonexistingLocalProcess() { new JmxRuntimeFactory().forLocalProcess(299); }