### Question:
MUXPool extends QBeanSupport implements MUX, MUXPoolMBean { public boolean isConnected() { for (MUX m : mux) if (isUsable(m)) return true; return false; }  void initService(); void stopService(); ISOMsg request(ISOMsg m, long timeout); void send(ISOMsg m); boolean isConnected(); void request(ISOMsg m, long timeout, final ISOResponseListener r, final Object handBack); @Override String[] getMuxNames(); @Override int getStrategy(); static final int ROUND_ROBIN; static final int PRIMARY_SECONDARY; static final int ROUND_ROBIN_WITH_OVERRIDE; static final int SPLIT_BY_DIVISOR; }### Answer:
@Test public void testIsConnectedThrowsNullPointerException() throws Throwable { try { new MUXPool().isConnected(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot read the array length because \"<local2>\" is null", ex.getMessage(), "ex.getMessage()"); } } }