EntityTagMatcher { @Override @SuppressWarnings("ConstantConditions") public String toString() { return isAsterisk ? ASTERISK : entityTag.toString(); } private  EntityTagMatcher(@Nullable final EntityTag entityTag, final boolean isAsterisk); static EntityTagMatcher fromString(final String entityTagMatcher); static EntityTagMatcher asterisk(); static boolean isValid(@Nullable final CharSequence entityTagMatcher); @SuppressWarnings("ConstantConditions") boolean strongMatch(final EntityTag entityTagToMatch); @SuppressWarnings("ConstantConditions") boolean weakMatch(final EntityTag entityTagToMatch); boolean isAsterisk(); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override @SuppressWarnings("ConstantConditions") String toString();  }
@Test public void toStringTest() { softly.assertThat(ASTERISK.toString()).isEqualTo("*"); softly.assertThat(EntityTagMatcher.fromString("W/\"1\"").toString()).isEqualTo("W/\"1\""); }