@Test
public void testAdjugate() {

  final double //
  a = -3, b = 2, c = -5, d = 2, //
      e = -1, f = 0, g = -2, h = 3, //
      i = 1, j = -3, k = -4, l = 0, //
      m = 4, n = 2, o = 3, p = 1;
  final Matrix4 mat4A = new Matrix4( //
      a, b, c, d, //
      e, f, g, h, //
      i, j, k, l, //
      m, n, o, p);
  // prepare sections
  final Matrix3 m00 = new Matrix3(f, g, h, j, k, l, n, o, p);
  final Matrix3 m01 = new Matrix3(b, c, d, j, k, l, n, o, p);
  final Matrix3 m02 = new Matrix3(b, c, d, f, g, h, n, o, p);
  final Matrix3 m03 = new Matrix3(b, c, d, f, g, h, j, k, l);
  final Matrix3 m10 = new Matrix3(e, g, h, i, k, l, m, o, p);
  final Matrix3 m11 = new Matrix3(a, c, d, i, k, l, m, o, p);
  final Matrix3 m12 = new Matrix3(a, c, d, e, g, h, m, o, p);
  final Matrix3 m13 = new Matrix3(a, c, d, e, g, h, i, k, l);
  final Matrix3 m20 = new Matrix3(e, f, h, i, j, l, m, n, p);
  final Matrix3 m21 = new Matrix3(a, b, d, i, j, l, m, n, p);
  final Matrix3 m22 = new Matrix3(a, b, d, e, f, h, m, n, p);
  final Matrix3 m23 = new Matrix3(a, b, d, e, f, h, i, j, l);
  final Matrix3 m30 = new Matrix3(e, f, g, i, j, k, m, n, o);
  final Matrix3 m31 = new Matrix3(a, b, c, i, j, k, m, n, o);
  final Matrix3 m32 = new Matrix3(a, b, c, e, f, g, m, n, o);
  final Matrix3 m33 = new Matrix3(a, b, c, e, f, g, i, j, k);
  // generate adjugate
  final Matrix4 testValue = new Matrix4( //
      m00.determinant(), -m01.determinant(), m02.determinant(), -m03.determinant(), //
      -m10.determinant(), m11.determinant(), -m12.determinant(), m13.determinant(), //
      m20.determinant(), -m21.determinant(), m22.determinant(), -m23.determinant(), //
      -m30.determinant(), m31.determinant(), -m32.determinant(), m33.determinant());
  assertEquals(testValue, mat4A.adjugate(null));
  assertEquals(testValue, mat4A.adjugateLocal());
}