assertEquals("b1", matrixParameters.getFirst("b"));
assertNull(matrixParameters.get("c"));
}
public void testPathSegmentImplSpecifics() {
PathSegmentImpl segment = new PathSegmentImpl(PATH_WITH_TWO_MATRIX_VALUES);
MultivaluedMap<String, String> matrixParameters = segment.getMatrixParameters();
matrixParameters.add("a", "a3");
matrixParameters.add("a", "a4");
matrixParameters.add("c", "c1");
assertEquals(3, matrixParameters.size());
assertEquals(4, matrixParameters.get("a").size());
assertEquals("a1", matrixParameters.get("a").get(0));
assertEquals("a2", matrixParameters.get("a").get(1));
assertEquals("a3", matrixParameters.get("a").get(2));
assertEquals("a4", matrixParameters.get("a").get(3));
assertEquals(1, matrixParameters.get("c").size());
assertEquals("c1", matrixParameters.get("c").get(0));
segment.clearMatrixParameter("c");
assertEquals(2, matrixParameters.size());
assertNull(matrixParameters.get("c"));
segment.clearAllMatrixParameters();
assertEquals(0, matrixParameters.size());
segment.setMatrixParameters("A=A1;B=B2");
assertEquals(2, matrixParameters.size());
assertEquals("A1", matrixParameters.get("A").get(0));
assertEquals("B2", matrixParameters.get("B").get(0));
assertNull(matrixParameters.get("a"));
assertNull(matrixParameters.get("b"));