### Question:
MatrixMultiplyWithTransposedSecondOperand extends AbstractVariable<Matrix> { public static MatrixMultiplyWithTransposedSecondOperand of(Variable<Matrix> A, Variable<Matrix> B) { return new MatrixMultiplyWithTransposedSecondOperand(A, B); } MatrixMultiplyWithTransposedSecondOperand(Variable<Matrix> A, Variable<Matrix> B); @Override Matrix apply(ComputationContext ctx); @Override Matrix gradient(Variable<?> parent, ComputationContext ctx); static MatrixMultiplyWithTransposedSecondOperand of(Variable<Matrix> A, Variable<Matrix> B);  }### Answer:
@Test void shouldApproximateGradient() { double[] m1 = { 1, 2, 3, 4, 5, 6 }; double[] m2 = { 1, 4, 6, 2.1, 5, -1 }; Weights<Matrix> A = new Weights<>(new Matrix(m1, 2, 3)); Weights<Matrix> B = new Weights<>(new Matrix(m2, 2, 3)); finiteDifferenceShouldApproximateGradient(List.of(A, B), new L2Norm(new MatrixMultiplyWithTransposedSecondOperand(A, B))); }