throws DerivativeException, IntegratorException,
IOException, ClassNotFoundException {
TestProblem1 pb = new TestProblem1();
double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
MidpointIntegrator integ = new MidpointIntegrator(step);
integ.setStepHandler(new ContinuousOutputModel());
integ.integrate(pb,
pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(integ.getStepHandler());
assertTrue(bos.size () > 98000);
assertTrue(bos.size () < 99000);
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());