ParameterizedPathMapping extends AbstractPathMapping { @Override public int hashCode() { return skeleton.hashCode() * 31 + Arrays.hashCode(paramNameArray); } ParameterizedPathMapping(String pathPattern); @Override Set<String> paramNames(); @Override String patternString(); @Override RoutePathType pathType(); @Override List<String> paths(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }
@Test void testHashcodeAndEquals() throws Exception { final ParameterizedPathMapping ppm = new ParameterizedPathMapping("/service/:value/test/:value2"); final ParameterizedPathMapping ppm2 = new ParameterizedPathMapping("/service/{value}/test/{value2}"); final ParameterizedPathMapping ppm3 = new ParameterizedPathMapping("/service/{value}/test/{value3}"); assertThat(ppm).isEqualTo(ppm2); assertThat(ppm).isNotEqualTo(ppm3); assertThat(ppm2).isNotEqualTo(ppm3); assertThat(ppm.hashCode()).isEqualTo(ppm2.hashCode()); assertThat(ppm.hashCode()).isNotEqualTo(ppm3.hashCode()); assertThat(ppm2.hashCode()).isNotEqualTo(ppm3.hashCode()); }