assertNull(m.getMatchedParameters("/abc//---/xyz"));
}
@Test
public void testMatch2Parameters() {
UrlMatcher m = new UrlMatcher("/abc/$1/$2/xyz");
assertEquals(2, m.orders.length);
assertEquals(0, m.orders[0]);
assertEquals(1, m.orders[1]);
// matched url:
assertArrayEquals(toArray("123", "456"), m.getMatchedParameters("/abc/123/456/xyz"));
assertArrayEquals(toArray("QQQ", "VVV"), m.getMatchedParameters("/abc/QQQ/VVV/xyz"));
assertArrayEquals(toArray("---", ""), m.getMatchedParameters("/abc/---//xyz"));
assertArrayEquals(toArray("", "---"), m.getMatchedParameters("/abc//---/xyz"));
assertArrayEquals(toArray("", ""), m.getMatchedParameters("/abc///xyz"));
// not matched url:
assertNull(m.getMatchedParameters("/"));
assertNull(m.getMatchedParameters("/abc//xyz"));
assertNull(m.getMatchedParameters("/abc//---//xyz"));
assertNull(m.getMatchedParameters("/abc////xyz"));
assertNull(m.getMatchedParameters("/abc/123/xyz/"));
assertNull(m.getMatchedParameters("/123/xyz"));
assertNull(m.getMatchedParameters("/abc/123/456/xyz/"));
}