public void equals() {
RequestMappingInfo info1 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
RequestMappingInfo info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertEquals(info1, info2);
assertEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo", "/NOOOOOO"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET, RequestMethod.POST),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("/NOOOOOO"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("/NOOOOOO"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/NOOOOOO"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/NOOOOOO"),
new ParamsRequestCondition("customFoo=customBar"));
assertFalse(info1.equals(info2));
assertNotEquals(info1.hashCode(), info2.hashCode());
info2 = new RequestMappingInfo(
new PatternsRequestCondition("/foo"),
new RequestMethodsRequestCondition(RequestMethod.GET),
new ParamsRequestCondition("foo=bar"),
new HeadersRequestCondition("foo=bar"),
new ConsumesRequestCondition("text/plain"),
new ProducesRequestCondition("text/plain"),
new ParamsRequestCondition("customFoo=NOOOOOO"));
assertFalse(info1.equals(info2));