@Test
@SuppressWarnings("deprecation")
void hashCode_test() {

    Origin originA = new Origin("https://example.com");
    Origin originB = new Origin("https", "example.com", 443);
    Origin originC = new Origin("http://localhost:8080");
    Origin originD = new Origin("http", "localhost", 8080);
    Origin android_apk_key_hash_abc123_a = new Origin("android:apk-key-hash:abc123");
    Origin android_apk_key_hash_abc123_b = new Origin("android:apk-key-hash:abc123");
    Origin android_apk_key_hash_def456 = new Origin("android:apk-key-hash:def");
    Origin invalid_data = new Origin("invalid:data");
    assertThat(originA).hasSameHashCodeAs(originB);
    assertThat(originC).hasSameHashCodeAs(originD);
    assertThat(android_apk_key_hash_abc123_a).hasSameHashCodeAs(android_apk_key_hash_abc123_b);
    assertThat(android_apk_key_hash_abc123_a.hashCode()).isNotEqualTo(android_apk_key_hash_def456.hashCode());
    assertThat(android_apk_key_hash_abc123_a.hashCode()).isNotEqualTo(invalid_data.hashCode());
}