### Question:
Beacon implements Parcelable, Serializable { @Override public int hashCode() { StringBuilder sb = toStringBuilder(); if (sHardwareEqualityEnforced) { sb.append(mBluetoothAddress); } return sb.toString().hashCode(); } @Deprecated protected  Beacon(Parcel in); protected  Beacon(Beacon otherBeacon); protected  Beacon(); static void setDistanceCalculator(DistanceCalculator dc); static DistanceCalculator getDistanceCalculator(); static void setHardwareEqualityEnforced(boolean e); static boolean getHardwareEqualityEnforced(); void setRssiMeasurementCount(int rssiMeasurementCount); int getPacketCount(); void setPacketCount(int packetCount); long getFirstCycleDetectionTimestamp(); void setFirstCycleDetectionTimestamp(long firstCycleDetectionTimestamp); long getLastCycleDetectionTimestamp(); void setLastCycleDetectionTimestamp(long lastCycleDetectionTimestamp); int getMeasurementCount(); void setRunningAverageRssi(double rssi); @Deprecated double getRunningAverageRssi(double rssi); double getRunningAverageRssi(); void setRssi(int rssi); int getManufacturer(); int getServiceUuid(); Identifier getIdentifier(int i); Identifier getId1(); Identifier getId2(); Identifier getId3(); List<Long> getDataFields(); List<Long> getExtraDataFields(); void setExtraDataFields(List<Long> fields); List<Identifier> getIdentifiers(); double getDistance(); int getRssi(); int getTxPower(); int getBeaconTypeCode(); String getBluetoothAddress(); String getBluetoothName(); String getParserIdentifier(); boolean isMultiFrameBeacon(); @Override int hashCode(); @Override boolean equals(Object that); void requestData(BeaconDataNotifier notifier); @Override String toString(); @Deprecated int describeContents(); @Deprecated void writeToParcel(Parcel out, int flags); boolean isExtraBeaconData(); @Deprecated
    static final Parcelable.Creator<Beacon> CREATOR; }### Answer:
@Test public void testHashCodeWithNullIdentifier() { Beacon beacon = new AltBeacon.Builder() .setIdentifiers(Arrays.asList( Identifier.parse("0x1234"), null)) .build(); assertTrue("hashCode() should not throw exception", beacon.hashCode() >= Integer.MIN_VALUE); }