public static void assertEquals(@Nullable Matrix expectedMatrix, Matrix actualMatrix) {
    if (expectedMatrix == null) {
      Assert.assertNull(actualMatrix);
      return;
    }
    Assert.assertNotNull(actualMatrix);
    String expected = expectedMatrix.toString();
    // NULLSAFE_FIXME[Not Vetted Third-Party]
    String actual = actualMatrix.toString();
    if (!actual.equals(expected)) {
      Assert.fail(String.format("\nexpected %s \nbut was %s", expected, actual));
    }
  }
Test utils for android.graphics classes.
drawee/src/test/java/com/facebook/drawee/drawable/AndroidGraphicsTestUtils.java