### Question:
WiFiDevice extends IPDevice { public void setAccessPointTimeout(int accessPointTimeout) { if (accessPointTimeout < 0) throw new IllegalArgumentException("Access point timeout cannot be less than 0."); this.accessPointTimeout = accessPointTimeout; } WiFiDevice(String port, int baudRate);  WiFiDevice(String port, int baudRate, int dataBits, int stopBits, int parity, int flowControl);  WiFiDevice(String port, SerialPortParameters serialPortParameters);  WiFiDevice(IConnectionInterface connectionInterface); @Override void open(); @Override XBeeProtocol getXBeeProtocol(); WiFiAssociationIndicationStatus getWiFiAssociationIndicationStatus(); AccessPoint getAccessPoint(String ssid); List<AccessPoint> scanAccessPoints(); boolean connect(String ssid, String password); boolean connect(AccessPoint accessPoint, String password); boolean disconnect(); boolean isConnected(); int getAccessPointTimeout(); void setAccessPointTimeout(int accessPointTimeout); void setIPAddressingMode(IPAddressingMode mode); IPAddressingMode getIPAddressingMode(); void setIPAddress(Inet4Address address); void setIPAddressMask(Inet4Address address); Inet4Address getIPAddressMask(); void setGatewayIPAddress(Inet4Address address); Inet4Address getGatewayIPAddress(); void setDNSAddress(Inet4Address address); Inet4Address getDNSAddress();  }### Answer:
@Test(expected=IllegalArgumentException.class) public void testSetAccessPointTimeoutNegative() { wifiDevice.setAccessPointTimeout(-50); }