### Question:
MemcachedClientFactory { public MemcachedClientIF createMemcachedClient() throws IOException { if (this.bean == null) { throw new RuntimeException("The MemcachedConnectionBean must be defined!"); } final List<InetSocketAddress> addrs = AddrUtil.getAddresses(this.bean.getNodeList()); final ConnectionFactory connectionFactory = this.bean.isConsistentHashing() ? new KetamaConnectionFactory() : new DefaultConnectionFactory(); final MemcachedClientIF client = new MemcachedClient(connectionFactory, addrs); return client; }  void setBean(MemcachedConnectionBean bean); MemcachedClientIF createMemcachedClient();  }### Answer:
@Test public void testCreateClientException() throws IOException { final MemcachedClientFactory factory = new MemcachedClientFactory(); try { factory.createMemcachedClient(); fail("Expected Exception."); } catch (RuntimeException ex) { assertTrue(true); } }