@Override
    public int hashCode() {
        StringBuilder sb = toStringBuilder();
        if (sHardwareEqualityEnforced) {
            sb.append(mBluetoothAddress);
        }
        return sb.toString().hashCode();
    }
@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);
    }