//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void domainTest()
        public virtual void domainTest()
        {
            DoubleArray[] x = new DoubleArray[4];
            x[0] = DoubleArray.of(2.3, 0.34);
            x[1] = DoubleArray.of(1e-8, 1.45);
            x[2] = DoubleArray.of(1.2, 0.0);
            x[3] = DoubleArray.of(1.2, Math.PI);

            VectorFieldSecondOrderDifferentiator fd = new VectorFieldSecondOrderDifferentiator();

            System.Func <DoubleArray, DoubleMatrix[]> fdFuncs = fd.differentiate(FUNC, DOMAIN);

            for (int k = 0; k < 4; k++)
            {
                DoubleMatrix[] fdValues = fdFuncs(x[k]);
                DoubleMatrix   t1       = DW1.apply(x[k]);
                DoubleMatrix   t2       = DW2.apply(x[k]);
                for (int i = 0; i < 2; i++)
                {
                    for (int j = 0; j < 2; j++)
                    {
                        assertEquals("first observation " + i + " " + j, t1.get(i, j), fdValues[0].get(i, j), 1e-6);
                        assertEquals("second observation " + i + " " + j, t2.get(i, j), fdValues[1].get(i, j), 1e-6);
                    }
                }
            }
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void outsideDomainTest()
        public virtual void outsideDomainTest()
        {
            VectorFieldSecondOrderDifferentiator fd = new VectorFieldSecondOrderDifferentiator();

            System.Func <DoubleArray, DoubleMatrix[]> fdFuncs = fd.differentiate(FUNC, DOMAIN);
            fdFuncs(DoubleArray.of(-1.0, 0.3));
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test()
        public virtual void test()
        {
            double      a     = 2.3;
            double      theta = 0.34;
            DoubleArray x     = DoubleArray.of(a, theta);

            VectorFieldSecondOrderDifferentiator fd = new VectorFieldSecondOrderDifferentiator();

            System.Func <DoubleArray, DoubleMatrix[]> fdFuncs = fd.differentiate(FUNC);
            DoubleMatrix[] fdValues = fdFuncs(x);

            DoubleMatrix t1 = DW1.apply(x);
            DoubleMatrix t2 = DW2.apply(x);

            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    assertEquals("first observation " + i + " " + j, t1.get(i, j), fdValues[0].get(i, j), 1e-6);
                    assertEquals("second observation " + i + " " + j, t2.get(i, j), fdValues[1].get(i, j), 1e-6);
                }
            }
        }