EntityTag { public boolean weakCompareTo(final EntityTag otherEntityTag) { return Objects.equals(getOpaqueTag(), otherEntityTag.getOpaqueTag()); } private  EntityTag(final boolean weak, final String opaqueTag); static boolean isValid(@Nullable final CharSequence entityTag); String getOpaqueTag(); boolean isWeak(); boolean strongCompareTo(final EntityTag otherEntityTag); boolean weakCompareTo(final EntityTag otherEntityTag); static EntityTag fromString(final String entityTag); static Optional<EntityTag> fromEntity(@Nullable final Object entity); static EntityTag strong(final String opaqueTag); static EntityTag weak(final String opaqueTag); @Override String toString(); @Override boolean equals(@Nullable final Object o); @Override int hashCode();  }
@Test public void weakComparisonEvaluatesToTrueForEqualWeakTags() { softly.assertThat(WEAK_1.weakCompareTo(WEAK_1)).isTrue(); }
@Test public void weakComparisonEvaluatesToFalseForDifferentWeakTags() { softly.assertThat(WEAK_1.weakCompareTo(WEAK_2)).isFalse(); }
@Test public void weakComparisonEvaluatesToTrueForOneStrongTagWithSameValueThanWeakTag() { softly.assertThat(WEAK_1.weakCompareTo(STRONG_1)).isTrue(); }
@Test public void weakComparisonEvaluatesToFalseForDifferentStrongTags() { softly.assertThat(STRONG_1.weakCompareTo(STRONG_2)).isFalse(); }
@Test public void weakComparisonEvaluatesToTrueForEqualStrongTags() { softly.assertThat(STRONG_1.weakCompareTo(STRONG_1)).isTrue(); }