### Question:
NBIoTDevice extends LPWANDevice { @Override public void open() throws XBeeException { super.open(); if (xbeeProtocol != XBeeProtocol.CELLULAR_NBIOT) throw new XBeeDeviceException("XBee device is not a " + getXBeeProtocol().getDescription() + " device, it is a " + xbeeProtocol.getDescription() + " device."); } NBIoTDevice(String port, int baudRate);  NBIoTDevice(String port, int baudRate, int dataBits, int stopBits, int parity, int flowControl);  NBIoTDevice(String port, SerialPortParameters serialPortParameters);  NBIoTDevice(IConnectionInterface connectionInterface); @Override void open(); @Override XBeeProtocol getXBeeProtocol();  }### Answer:
@Test public void testNotNBIoTDevice() throws Exception { PowerMockito.suppress(PowerMockito.method(CellularDevice.class, "open")); exception.expect(XBeeDeviceException.class); exception.expectMessage(is(equalTo("XBee device is not a Cellular NB-IoT device, it is a Unknown device."))); nbiotDevice.open(); }