### Question:
ClientRegistry implements IClientRegistry, ClientRegistryMBean { public Client getClient(String id) throws ClientNotFoundException { final Client result = (Client) clients.get(id); if (result == null) { throw new ClientNotFoundException(id); } return result; } ClientRegistry();  ClientRegistry(String name); Client getClient(String id); ClientList<Client> getClientList(); boolean hasClient(String id); IClient lookupClient(String id); IClient newClient(Object[] params); String nextId(); String previousId();  }### Answer:
@Test public void testGetClient() { IClient client = reg.getClient("0"); Assert.assertNotNull(client); IClient client2 = null; try { client2 = reg.getClient("999999"); fail("An exception should occur here"); } catch (ClientNotFoundException e) { Assert.assertTrue(true); } Assert.assertNull(client2); }