@Test public void testCopyFrom() { PeerProperties pp = new PeerProperties(TEST_MAC); pp.copyFrom(bluetoothPeerProperties); assertThat(pp.getBluetoothMacAddress(), is(equalTo(TEST_MAC))); assertThat(pp.getExtraInformation(), is(equalTo(TEST_EXTRA_INFO))); pp.copyFrom(wifiPeerProperties); assertThat(pp.getBluetoothMacAddress(), is(equalTo(PeerProperties.BLUETOOTH_MAC_ADDRESS_UNKNOWN))); assertThat(pp.getExtraInformation(), is(equalTo(PeerProperties.NO_EXTRA_INFORMATION))); assertThat(pp.getDeviceAddress(), is(equalTo(DEVICE_ADDRESS))); assertThat(pp.getServiceType(), is(equalTo(SERVICE_TYPE))); assertThat(pp.getDeviceName(), is(equalTo(DEVICE_NAME))); }
public void copyFrom(PeerProperties sourcePeerProperties) { if (sourcePeerProperties != null) { mBluetoothMacAddress = sourcePeerProperties.mBluetoothMacAddress; mServiceType = sourcePeerProperties.mServiceType; mDeviceName = sourcePeerProperties.mDeviceName; mDeviceAddress = sourcePeerProperties.mDeviceAddress; mExtraInformation = sourcePeerProperties.mExtraInformation; } }
PeerProperties { public void copyFrom(PeerProperties sourcePeerProperties) { if (sourcePeerProperties != null) { mBluetoothMacAddress = sourcePeerProperties.mBluetoothMacAddress; mServiceType = sourcePeerProperties.mServiceType; mDeviceName = sourcePeerProperties.mDeviceName; mDeviceAddress = sourcePeerProperties.mDeviceAddress; mExtraInformation = sourcePeerProperties.mExtraInformation; } } }
PeerProperties { public void copyFrom(PeerProperties sourcePeerProperties) { if (sourcePeerProperties != null) { mBluetoothMacAddress = sourcePeerProperties.mBluetoothMacAddress; mServiceType = sourcePeerProperties.mServiceType; mDeviceName = sourcePeerProperties.mDeviceName; mDeviceAddress = sourcePeerProperties.mDeviceAddress; mExtraInformation = sourcePeerProperties.mExtraInformation; } } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); }
PeerProperties { public void copyFrom(PeerProperties sourcePeerProperties) { if (sourcePeerProperties != null) { mBluetoothMacAddress = sourcePeerProperties.mBluetoothMacAddress; mServiceType = sourcePeerProperties.mServiceType; mDeviceName = sourcePeerProperties.mDeviceName; mDeviceAddress = sourcePeerProperties.mDeviceAddress; mExtraInformation = sourcePeerProperties.mExtraInformation; } } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); String getId(); String getBluetoothMacAddress(); String getDeviceName(); String getDeviceAddress(); int getExtraInformation(); void copyFrom(PeerProperties sourcePeerProperties); boolean isValid(); boolean hasMoreInformation(PeerProperties otherPeerProperties); static boolean copyMissingValuesFromOldPeer(
            PeerProperties oldPeerProperties, PeerProperties newPeerProperties); @Override boolean equals(Object otherPeerProperties); @Override String toString(); }
PeerProperties { public void copyFrom(PeerProperties sourcePeerProperties) { if (sourcePeerProperties != null) { mBluetoothMacAddress = sourcePeerProperties.mBluetoothMacAddress; mServiceType = sourcePeerProperties.mServiceType; mDeviceName = sourcePeerProperties.mDeviceName; mDeviceAddress = sourcePeerProperties.mDeviceAddress; mExtraInformation = sourcePeerProperties.mExtraInformation; } } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); String getId(); String getBluetoothMacAddress(); String getDeviceName(); String getDeviceAddress(); int getExtraInformation(); void copyFrom(PeerProperties sourcePeerProperties); boolean isValid(); boolean hasMoreInformation(PeerProperties otherPeerProperties); static boolean copyMissingValuesFromOldPeer(
            PeerProperties oldPeerProperties, PeerProperties newPeerProperties); @Override boolean equals(Object otherPeerProperties); @Override String toString(); static final String BLUETOOTH_MAC_ADDRESS_UNKNOWN; static final int NO_EXTRA_INFORMATION; }