PrefixPathMapping extends AbstractPathMapping { @Override public int hashCode() { return stripPrefix ? prefix.hashCode() : -prefix.hashCode(); } PrefixPathMapping(String prefix, boolean stripPrefix); @Override Set<String> paramNames(); @Override String patternString(); @Override RoutePathType pathType(); @Override List<String> paths(); @Override int hashCode(); @Override boolean equals(@Nullable Object obj); @Override String toString();  }
@Test void equality() { final PrefixPathMapping a = new PrefixPathMapping("/foo", true); final PrefixPathMapping b = new PrefixPathMapping("/bar", true); final PrefixPathMapping c = new PrefixPathMapping("/foo", true); Assumptions.assumeTrue(a != c); assertThat(a).isEqualTo(c); assertThat(a).isNotEqualTo(b); assertThat(a.hashCode()).isEqualTo(c.hashCode()); assertThat(a.hashCode()).isNotEqualTo(b.hashCode()); }