### Question:
SvgInkscapeUtils { public static Matrix3f parseTransformAttribute(String transformAttribute, Matrix3f m) { return SvgTransformUtils.parseTransform(transformAttribute, m); }  static String getLabel(Element element); static boolean isLayer(Element element); static String getGroupMode(Element element); static Matrix3f getTransform(Element element); static Matrix3f getTransform(Element element, Matrix3f m); static Matrix3f parseTransformAttribute(String transformAttribute, Matrix3f m); static String transformToAttribute(Matrix3f m); static boolean isFlipped(Matrix3f matrix); static final String INKSCAPE; static final String SODIPODI; static final String XLINK; }### Answer:
@Test public void shouldParseScaleTransformWithTwoValues() { String transformAttribute = " scale (2, -3) "; Matrix3f matrix = new Matrix3f(); matrix.setIdentity(); SvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix); Matrix3f expectedMatrix = new Matrix3f(new float[] { 2, 0, 0, 0, -3, 0, 0, 0, 1 }); assertThat(matrix, IsEqual.equalTo(expectedMatrix)); }
@Test public void shouldParseScaleTransformWithTwoValues2() { String transformAttribute = "scale(-1, 1)"; Matrix3f matrix = new Matrix3f(); matrix.setIdentity(); SvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix); Matrix3f expectedMatrix = new Matrix3f(new float[] { -1, 0, 0, 0, 1, 0, 0, 0, 1 }); assertThat(matrix, IsEqual.equalTo(expectedMatrix)); }
@Test public void shouldParseScaleTransformWithOneValues() { String transformAttribute = " scale (2) "; Matrix3f matrix = new Matrix3f(); matrix.setIdentity(); SvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix); Matrix3f expectedMatrix = new Matrix3f(new float[] { 2, 0, 0, 0, 2, 0, 0, 0, 1 }); assertThat(matrix, IsEqual.equalTo(expectedMatrix)); }
@Test public void shouldParseAMatrixAttribute() { String transformAttribute = "matrix(-0.883294,-0.468819,-0.468819,0.883294,0,0)"; Matrix3f matrix = new Matrix3f(); matrix.setIdentity(); SvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix); Matrix3f expectedMatrix = new Matrix3f(new float[] { -0.883294f, -0.468819f, 0, -0.468819f, 0.883294f, 0, 0, 0, 1 }); assertThat(matrix, IsEqual.equalTo(expectedMatrix)); }