@Test public void nullIsNotEqualToAnyVariant(@Mocked final Variant variant) { assertThat(Variants.equals(null,variant),equalTo(false)); }
public static boolean equals(final Variant v1, final Variant v2) { if(v1==v2) { return true; } if(v1==null || v2==null) { return false; } return Objects.equals(v1.type(), v2.type()) && Objects.equals(v1.charset(), v2.charset()) && Objects.equals(v1.language(), v2.language()); }
Variants { public static boolean equals(final Variant v1, final Variant v2) { if(v1==v2) { return true; } if(v1==null || v2==null) { return false; } return Objects.equals(v1.type(), v2.type()) && Objects.equals(v1.charset(), v2.charset()) && Objects.equals(v1.language(), v2.language()); } }
Variants { public static boolean equals(final Variant v1, final Variant v2) { if(v1==v2) { return true; } if(v1==null || v2==null) { return false; } return Objects.equals(v1.type(), v2.type()) && Objects.equals(v1.charset(), v2.charset()) && Objects.equals(v1.language(), v2.language()); } private  Variants(); }
Variants { public static boolean equals(final Variant v1, final Variant v2) { if(v1==v2) { return true; } if(v1==null || v2==null) { return false; } return Objects.equals(v1.type(), v2.type()) && Objects.equals(v1.charset(), v2.charset()) && Objects.equals(v1.language(), v2.language()); } private  Variants(); static boolean equals(final Variant v1, final Variant v2); static MediaType contentType(Variant variant); static VariantBuilder builder(); static VariantBuilder from(Variant variant); }
Variants { public static boolean equals(final Variant v1, final Variant v2) { if(v1==v2) { return true; } if(v1==null || v2==null) { return false; } return Objects.equals(v1.type(), v2.type()) && Objects.equals(v1.charset(), v2.charset()) && Objects.equals(v1.language(), v2.language()); } private  Variants(); static boolean equals(final Variant v1, final Variant v2); static MediaType contentType(Variant variant); static VariantBuilder builder(); static VariantBuilder from(Variant variant);  }