### Question:
IPv6Device extends XBeeDevice { @Override public void readDeviceInfo() throws TimeoutException, XBeeException { super.readDeviceInfo(); byte[] response = getParameter("MY"); try { ipv6Address = (Inet6Address) Inet6Address.getByAddress(response); } catch (UnknownHostException e) { throw new XBeeException(e); } try { response = getParameter("C0"); sourcePort = ByteUtils.byteArrayToInt(response); } catch (TimeoutException e) { } catch (XBeeException e) { } } protected  IPv6Device(String port, int baudRate); protected  IPv6Device(String port, int baudRate, int dataBits, int stopBits,
			int parity, int flowControl); protected  IPv6Device(String port, SerialPortParameters serialPortParameters); protected  IPv6Device(IConnectionInterface connectionInterface); @Override XBeeNetwork getNetwork(); @Override void readDeviceInfo(); @Override XBee16BitAddress get16BitAddress(); @Override XBee64BitAddress getDestinationAddress(); @Override void setDestinationAddress(XBee64BitAddress xbee64BitAddress); @Override void addDataListener(IDataReceiveListener listener); @Override void removeDataListener(IDataReceiveListener listener); @Override XBeeMessage readData(); @Override XBeeMessage readData(int timeout); @Override XBeeMessage readDataFrom(RemoteXBeeDevice remoteXBeeDevice); @Override XBeeMessage readDataFrom(RemoteXBeeDevice remoteXBeeDevice,
			int timeout); @Override void sendBroadcastData(byte[] data); @Override void sendData(RemoteXBeeDevice remoteXBeeDevice, byte[] data); @Override void sendDataAsync(RemoteXBeeDevice remoteXBeeDevice, byte[] data); @Override void addIPDataListener(IIPDataReceiveListener listener); @Override void removeIPDataListener(IIPDataReceiveListener listener); void startListening(int sourcePort); void stopListening(); void sendIPData(Inet6Address ipv6Address, int destPort, 
			IPProtocol protocol, byte[] data); void sendIPDataAsync(Inet6Address ipv6Address, int destPort, 
			IPProtocol protocol, byte[] data); IPMessage readIPData(); IPMessage readIPData(int timeout); IPMessage readIPDataFrom(Inet6Address ipv6Address); IPMessage readIPDataFrom(Inet6Address ipv6Address, int timeout);  }### Answer:
@Test public void testReadDeviceInfoIP() throws Exception { Mockito.doReturn(RESPONSE_MY).when(ipv6Device).getParameter(PARAMETER_MY); Mockito.doReturn(RESPONSE_C0).when(ipv6Device).getParameter(PARAMETER_C0); assertNull(ipv6Device.getIPv6Address()); assertEquals(IPv6Device.DEFAULT_SOURCE_PORT, ipv6Device.sourcePort); ipv6Device.readDeviceInfo(); Mockito.verify((AbstractXBeeDevice)ipv6Device, Mockito.times(1)).readDeviceInfo(); assertEquals(ipv6Address, ipv6Device.getIPv6Address()); assertEquals(EXPECTED_SOURCE_PORT, ipv6Device.sourcePort); }