DormandPrince853Integrator integrator = new DormandPrince853Integrator(0.001, 1000, 1.0e-14, 1.0e-14);
integrator.addEventHandler(new SecondaryStateEvent(index, -3.0), 0.1, 1.0e-9, 1000);
integrator.setInitialStepSize(3.0);
integrator.integrate(equation, 30.0);
Assert.assertEquals( 1.0, equation.getTime(), 1.0e-10);
Assert.assertEquals( 2.0, equation.getPrimaryState()[0], 1.0e-10);
Assert.assertEquals(-3.0, equation.getSecondaryState(0)[0], 1.0e-10);
}