@Test
public void matchPatternsCondition() {
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo");
RequestMappingInfo info = new RequestMappingInfo(
new PatternsRequestCondition("/foo*", "/bar"), null, null, null, null, null, null);
RequestMappingInfo expected = new RequestMappingInfo(
new PatternsRequestCondition("/foo*"), null, null, null, null, null, null);
assertEquals(expected, info.getMatchingCondition(request));
info = new RequestMappingInfo(
new PatternsRequestCondition("/**", "/foo*", "/foo"), null, null, null, null, null, null);
expected = new RequestMappingInfo(
new PatternsRequestCondition("/foo", "/foo*", "/**"), null, null, null, null, null, null);
assertEquals(expected, info.getMatchingCondition(request));
}